• Resolved tiagomagnuss

    (@tiagomagnuss)


    Hey, I’d like what’s the better and cleanest way to add the possibility to use jQuery along with this plugin.

    Att,
    Tiago Magnus

Viewing 1 replies (of 1 total)
  • Plugin Author Diana Burduja

    (@diana_burduja)

    The jQuery library is loaded by default by WordPress, so you don’t need to load it again.

    If you want to add a script that makes use of the jQuery library, the cleanest is way described in the comment found in the editor when you click on the ‘Add JS Code’:

    /* Add your JavaScript code here.
                         
    If you are using the jQuery library, then don't forget to wrap your code inside jQuery.ready() as follows:
    
    jQuery(document).ready(function( $ ){
        // Your code in here 
    });
    
    End of comment */ 

    As an example, if you want to make an alert with the text found in the H1 tag, then the code will be:

    jQuery(document).ready(function( $ ){
        alert($('h1').text());
    });
Viewing 1 replies (of 1 total)
  • The topic ‘Using jQuery along’ is closed to new replies.