0

Im using a plug in which is using fancybox. However in the console it has the error

read property msie of undefined.

i think this has something to do with my NivoSlider which i have called in the wordpress functions file as below:-

<?php if (!is_admin()) add_action("wp_enqueue_scripts", "my_jquery_enqueue", 11);

function my_jquery_enqueue() {

wp_deregister_script('jquery');

        wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js', false, null, false);

        wp_enqueue_script('jquery');

wp_register_script( 'jquery-ui', get_template_directory_uri().'/js/jquery-ui.min.js', array('jquery'), false, null, false);

wp_enqueue_script( 'jquery-ui' );

wp_register_script( 'nivoslider', get_template_directory_uri().'/js/jquery.nivo.slider.pack.js', array('jquery'), null, false);

wp_enqueue_script( 'nivoslider' );

wp_register_script( 'nq', get_template_directory_uri().'/js/nqmedia.js', array('jquery'), null, false);

wp_enqueue_script( 'nq' );

}

?>

Website is www.nqmedia.co.uk

Can anyone advise as to why these two are clashing? Thanks

Kirsty Marks
  • 483
  • 8
  • 29
  • possible duplicate of [Fancybox doesn't work with jQuery v1.9.0 \[ f.browser is undefined / Cannot read property 'msie' \]](http://stackoverflow.com/questions/14344289/fancybox-doesnt-work-with-jquery-v1-9-0-f-browser-is-undefined-cannot-read) – JFK Feb 23 '13 at 18:39
  • Your options http://stackoverflow.com/a/14344290/1055987 – JFK Feb 23 '13 at 18:40

1 Answers1

3

your website is using jQuery 1.9.1

in jQuery >= 1.9 jQuery.browser (or $.browser) was removed (see here: http://api.jquery.com/jQuery.browser/)

the fancybox plugin is using $.browser.msie (where $.browser is undefined)

you need to use jQuery 1.8.3 if you want to use that fancybox plugin, or rewrite the plugin

hereandnow78
  • 14,094
  • 8
  • 42
  • 48