Issue #13 resolved

Bookmarks don't work on non-index page.

Alex Robbins
created an issue

This is probably a django 1.2 bug. You test for jQuery, but then later use $. I think that the django jQuery use noConflict to undefine $.

That happens in the bookmark plugin and in the bookmark template. I fixed it in those places and bookmarks work now.

Comments (8)

  1. Alex Robbins reporter

    The fix didn't quite work. If jQuery isn't defined, then the document.write triggers. However, it looks like the rest of that script tag is executed before the jquery file is loaded. That means jQuery.noConflict blows up.

    If the jQuery.noConflict() is in a different (later) script tag, then it works fine for me.

    Also, not hugely important, but this file: has some unneeded changes. They don't break anything, but they aren't needed either.

    (function($) {
        //plugin definition
        //Inside this function $ will be jQuery, since jQuery was passed in as an argument to the function.

    So, strictly, it worked before, even if jQuery.noConflict had been called. That way you can still use the nice $ shortcut inside your plugin.

  2. Alex Robbins reporter

    Sure, might take a little while. I am trying to get approval to spend some work time on this, since we are going to be using it for some of our projects. Otherwise it might not happen until later today or tomorrow.

  3. Alex Robbins reporter

    Ok, I sent a pull request. This is the first time I've used bitbucket much, so let me know if I am doing something wrong or I can make the pulls apply more cleanly.

  4. Log in to comment