• Resolved futureyoon

    (@futureyoon)


    Hi

    Is it possible to add jquery using code snippets?
    something like this
    jQuery( document ).ready( function(){
    xxxxxxx
    });

    if possible, what would the code look like? can you share some light here?

    Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Shea Bunge

    (@bungeshea)

    Absolutely.

    You can essentially use the JavaScript snippet:

    add_action( 'wp_head', function () { ?>
    <script>
    jQuery(document).ready(function() {
    	// xxxxxx
    });
    </script>
    <?php } );
    
    add_action( 'wp_enqueue_script', function () {
    	wp_enqueue_script( 'jquery' );
    } );
    Thread Starter futureyoon

    (@futureyoon)

    Cool~!! Thank you so much!! That saved me!

    I personally think that you should talk about this as one of features – meta tag and jquery.

    I could find any relevant info in search.

    • This reply was modified 3 years, 6 months ago by futureyoon.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘add jquery possible?’ is closed to new replies.