gilbitron / Dropit

Dropit is a jQuery plugin for single level dropdown menu's
153 stars 74 forks source link

Can't init dropit #25

Open dylanh724 opened 8 years ago

dylanh724 commented 8 years ago

jq 2.2.0 <script src='js/dropit.js' type='text/javascript'></script>

<link href="css/dropit.css" rel="stylesheet" type="text/css">

$( document ).ready(function() 
{
    // Copy+Paste sample .menu
    $( '.menu' ).dropit({
        afterLoad: function(){ console.log("dropit initialized.") } // Triggers when plugin has loaded
    });
}

Nothing was showing up on click, so I added the callback option afterLoad and I'm not getting this console msg.

ghost commented 8 years ago

Make sure you have coresponding HTML markup + try

(function($){
  $('.menu').dropit({
    afterLoad: function(){ console.log("dropit initialized.") } // Triggers when plugin has loaded
  });
})(jQuery);