0
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> --> OK, usable
<script type="text/javascript" src="//cdn.jsdelivr.net/jquery.sidr/1.1.1/jquery.sidr.js"></script> --> sidr() undefined

I am getting a weird bug with a bookmarklet that injects jQuery plugins into the header of the current page and what happens is that although jQuery (from cdn) gets loaded the other jQuery plugin from (cdn.js) gets the 304 not modified treatment and that library cannot be used.

This happens on some websites while it the jQuery library sidr works as expected on other sites.

What is causing this? if jQuery gets loaded from google cdn but not the jQuery plugins from cdnjs, what can I do to resolve this?

2

1 Answer 1

0

try something like this

$(document).ready(function() {
    $('#simple-menu').sidr();
});

Note

if you are using any server than use this

    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
    <script type="text/javascript" src="//cdn.jsdelivr.net/jquery.sidr/1.1.1/jquery.sidr.js"></script>

if you are using simply checking it with html file in browser than

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
    <script type="text/javascript" src="http://cdn.jsdelivr.net/jquery.sidr/1.1.1/jquery.sidr.js"></script>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.