nnattawat / flip

A lightweight jQuery plugin to make 3D card flipping animation
Other
626 stars 312 forks source link

TypeError: flip is undefined[Learn More] flip.js:349:11 #125

Open JDSlimz opened 7 years ago

JDSlimz commented 7 years ago

Just added the library and tried to run it using:

jQuery('#play').flip(true);

I got the error:

TypeError: flip is undefined[Learn More] flip.js:349:11

My Script calls are correct:

wp_enqueue_script('jquery', 'https://code.jquery.com/jquery-3.2.1.min.js', array(), null, true); wp_enqueue_script('flip', '/wp-content/themes/vote/flip.js', array(), null, true);

I have tried using the cdn version and using jQuery 2.1.4 to no avail.

level42ca commented 6 years ago

Seems like flip.js isn't being loaded then. Do you have a sample site we can check?

rasmuschristensen commented 6 years ago

@JDSlimz ensure you have initialized the compoment like $("#card").flip({ trigger: 'toggle' });