Saturday, April 9, 2011

Jquery Confliction with Plugin

when some jquery developers written or used same function name or same methods then jquery conflicts is happening. In wordpress when jQuery confliction occured than some plugin's with jquery not work perfectly. You could try to execute your jquery with a noConflict option -

<script type="text/javascript">
var j = jQuery.noConflict();
j("div p").hide();
$("content").style.display = 'none';

Use this javascript code after <?php wp_head(); ?> code in the header.php file in your theme folder.
And add below line in your functions.php in your theme folder.

function my_init_method() {
    if (!is_admin()) {
        wp_deregister_script( 'jquery' );
        wp_register_script( 'jquery', 'wp-content\themes\thebusinessoctopus-wordpress-theme\images\slideshow\js\jquery.js');
        wp_enqueue_script( 'jquery' );

add_action('init', 'my_init_method');

That's all done..

No comments:

Post a Comment