ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Using jQuery

December 08, 2010 8:06am

Subscribe [3]
  • #1 / Dec 08, 2010 8:06am

    Loquela

    105 posts

    Hi there,

    I think I get how to use the jquery tags. But how do I trigger a jquery plugin?

    I’m trying to use corner.js:

    {exp:jquery:script_tag}
    {exp:jquery:script_tag ui='core'}
    {exp:jquery:script_tag plugin='corner'}
    
    
     $(document).ready(function(){
    
       $('.corners').corner();
    
     });


    What am I doing wrong?

    Thanks in advance,

    L.

  • #2 / Dec 08, 2010 8:54am

    cherrypj

    158 posts

    Is the jQuery Module installed? You can check here: CP Home > Add-ons > Modules.

  • #3 / Dec 08, 2010 9:07am

    Loquela

    105 posts

    Thanks Michael,

    Yes, it’s installed. I have another plugin (image_fader) and that works fine:

    the full code in my header is:

    {exp:jquery:script_tag}
    {exp:jquery:script_tag ui='core'}
    {exp:jquery:script_tag plugin='image_fader'}
    {exp:jquery:script_tag plugin='corner'}
    
    [removed]
    $(document).ready(function(){
    
      $(’.corners’).corner();
    
    });
    [removed]
  • #4 / Dec 08, 2010 1:39pm

    cherrypj

    158 posts

    There’s actually an issue with my image_fader plugin (it’s not found), but when I remove that line, the corner plugin works a treat.

    
    
    

    Do you have Firefox/Firebug (or any of the developer consoles) to check if there’s an error being thrown?

  • #5 / Dec 08, 2010 2:29pm

    Loquela

    105 posts

    Thanks Michael,

    I checked it in firebug and I discovered that I had used ’ instead of ’  Doh!!!

    Sorted!

  • #6 / Dec 08, 2010 3:20pm

    cherrypj

    158 posts

    Good catch. I actually made that correction when I copied your code, but attributed it to the Forum’s typography, and not your typing. Glad you’re sorted!

  • #7 / Dec 09, 2010 11:04am

    Sue Crocker

    26054 posts

    Glad things are working again.. and thanks, Michael for helping out. Don’t hesitate to post again as needed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases