JQuery in \"Custom Javascript\" isn\'t taking effect?

  • Author
    Posts
  • #31002
    Stewart

    Hello,

    I’m using Parabola for a friend of mine who runs a few webcomics (http://baldwinpage.com) and he’d like me to make it so that when the comic image in any given post is clicked, it takes the reader to the next page of the comic.

    Example of what the post pages look like:
    Anna Galactic, Being Brought In 14

    I have some JQuery which does this:

    
            //Adds a link to the next page around the first image in a post
            $(document).ready(function() {            
                    //select the html from the link with the rel of "next"
                    var href = $('a[rel=next]').attr('href');
    
                    //wrap the first image in the entry-content div
                    $('div.entry-content img:first').wrap("<a href='" + href + "' </a>");
                });
    

    But, while my code works when I test it elsewhere, I can’t seem to get Parabola to make it go when I put it in the “custom javascript” section of the theme settings. (Also, and I’m not sure it matters, but my ‘s in the ‘” keep getting replaced with the HTML entities, even though they don’t when I just a ‘ by itself.)

    Is it possible to use JQuery there? Or am I limited to straight-up Javascript?

Viewing 1 post (of 1 total)

The topic ‘JQuery in \"Custom Javascript\" isn\'t taking effect?’ is closed to new replies.