Uncaught TypeError: $(...).anotherfunc is not a function

flip.js effect is working and console.log inside flip:done is also working but "anotherfunc" called inside flip:done is not working. please help.

function anotherfunc( ) {
    console.log("its anotherfunc");
}


jQuery(document).ready(function($) {

//it is working here but not inside flip:done
anotherfunc();

$(".card").flip({
    trigger:  'hover',
    speed : 1000
});


$(".card").on('flip:done',function(  ){

  // this is also working
  console.log('from inside flip:done');

  // this is also working
  console.log( $(this) ); 


  // this is saying "is not a function"
  $(this).anotherfunc();

});


});//on laod

Answers 1

Related Articles