Keyword

nivoSlider - object is null or undefined

More
12 years 6 months ago #64322 by Edgar
I don't know where my previous post ended up so I am re-posting the same question for the second time. Sorry if I am doubling up!!

I have just installed a new template on a fresh Joomla 2.5 install. The template uses K2 heavily and this is the first time I heard of K2. I have been learning about K2 the last 2 days and it is very interesting.

The template I installed works fine and this template has a K2 Slider (nivoSlider sub-template) on the top of the Home page just under the Main Menu. The slider was working fine until I installed the HikaShop Joomla extension and created a new Menu item in the Main Menu called Shop. This menu item simply points to the HikaShop product Listing menu item.

Now the slider will not load any images and doesn't work. If I looked at the javaScript errors there is only one related to the slider, this error says:

" Unable to get value of the property 'nivoSlider': object is null or undefined"

and this error happens on this line of code:

var $slider_ul_id = $('#slider'); //Please define slider items list ID
$slider_ul_id.nivoSlider({ //// …..error happens here as $slider_ul_id is Null


If I disable the menu item 'Shop' from the main menu then the slider will work again. Somehow the HikaShop and K2 JavaScript are interfering with each other. If I look at the page source code the only difference between having the Hikashop menu enabled and disabled is that it loads a Hikashop.js file in the enabled mode. So this Hikashop.js is somehow interfering with the nivoSlider.js.

I have a feeling it maybe related to the order in which the js files are being loaded and executed but I am no expert and this is only a hunch. I have been scratching my head now for 2 days and can't seem to make any progress, I am hoping someone here can help. I also contacted the template supplier for help and I am still waiting for their reply.

The site is lyricaldesign.com.au/ld/ and I left the Shop menu item enable so you can see the slider not loading under the Main Menu. Any suggestions on how to get around this issue?

Please Log in or Create an account to join the conversation.

More
12 years 6 months ago #64323 by Edgar
I have been trying to fix this on my own and I am getting somewhere. I found that in the Hikashop.js file if I remove the below function everything works:

if (typeof(jQuery) != "undefined") {
if (typeof(jQuery.noConflict) == "function") {
jQuery.noConflict();
}
}

Does anyone know what is this function for and is it safe to remove it?

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum