WordPress.org

Ready to get started?Download WordPress

Forums

jquery doesn't work in chrome and opera (2 posts)

  1. rllagk
    Member
    Posted 3 years ago #

    Hi, why my function doesn't work in chrome and opera, but works in ie and mozilla firefox?

    $j=jQuery.noConflict();
        $j(document).ready(function(){
            alert('jquery');
        });
  2. Mark / t31os
    Moderator
    Posted 3 years ago #

    Try using the suggested no conflict wrapper method.
    http://codex.wordpress.org/Function_Reference/wp_enqueue_script#jQuery_noConflict_wrappers

    Example:

    jQuery(document).ready( function($) {
             // You can safely use $ here now, eg. $('selector').whatever();
             alert('jquery');
        } );

Topic Closed

This topic has been closed to new replies.

About this Topic