Mootools and jQuery on same page

  • Posts: 7
  • Thank you received: 0
11 years 8 months ago #92572

Hello there,

I found a problem when I enabled Hikashop cart modules, then the Mootools will conflict with my jQuery pages. And throgh my web site guru it recommend me to ask help from you to find the following code and have some modification.

$(document).ready(function(){ 
			
			$(window).scroll(function(){
				if ($(this).scrollTop() > 100) {
					$('.scrollup').fadeIn();
				} else {
					$('.scrollup').fadeOut();
				}
			}); 
			
			$('.scrollup').click(function(){
				$("html, body").animate({ scrollTop: 0 }, 600);
				return false;
			});
 
		});

Where can I find the above code?

And he recommend me to start with:
jQuery(document).ready(function($){

Thanks a lot.

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

  • Posts: 82795
  • Thank you received: 13356
  • MODERATOR
11 years 8 months ago #92618

Hi,

That code is not in HikaShop.

That jquery code should indeed start like you say in order to avoid conflicts with mootools code.

That code seems to be coming from your template.

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

  • Posts: 7
  • Thank you received: 0
11 years 8 months ago #92628

Thanks for your reply.

But the problem only caused when cart module enabled and "product listing" in "content menus" enabled. If both of them disabled the page will go correctly.

So it's not from my template, but seem to caused by the two the packages that generate something to conflict.

Would you please take a look at them both?

Thanks a lot.

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

  • Posts: 7
  • Thank you received: 0
11 years 8 months ago #92632

BTW, my site is Joomla 3.0 and my tempalte use JQuery as default.

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

  • Posts: 82795
  • Thank you received: 13356
  • MODERATOR
11 years 8 months ago #92636

It sure is a conflict since HikaShop uses mootools. So on pages where you don't have HikaShop, you don't have the problem since mootools is not loaded. That doesn't mean that it comes from HikaShop.

I can look but I know all the code of HikaShop so I can guarantee you that this code is not in HikaShop.

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

  • Posts: 7
  • Thank you received: 0
11 years 8 months ago #92693

Hello,

Thanks for your investigation. I found if I enabled "product listing" in "content menus" or cart module, the other pages in my site will also work improperly, not only where I place hikashop module. So maybe the conflict will be more furthure.

Hope you can check.

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

  • Posts: 82795
  • Thank you received: 13356
  • MODERATOR
11 years 8 months ago #92697

And can you give the link to the page where you have the problem ?

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

  • Posts: 7
  • Thank you received: 0
11 years 8 months ago #92731

I tried again, it seems only affect my pages with "JQuery" and "Mootools" enables the same time. But to be frustrated, my content contains JQuery code and if the module enabled, the page will not show properly.

Anyway to workaround this?

I have a waiting order for Hikashop because I like this product, but this issue will suffer my site a lot.

Thanks for your help.
Tyrone

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

  • Posts: 13201
  • Thank you received: 2322
11 years 8 months ago #92873

Hi,

Can you try to install the plugin "jQuery easy" ? It should solve the conflicts between jQuery and Mootools.

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

  • Posts: 7
  • Thank you received: 0
11 years 8 months ago #92947

I've tried it, but still not work. I enabled "Enable JQuery" but the page still no work.

Can you check with my page to see how it conflicted and how to modify the plugin?

www.herbalnc.com/eating-habbits

This page should full of charts but now only polls.

Thanks a lot.

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

  • Posts: 26152
  • Thank you received: 4027
  • MODERATOR
11 years 8 months ago #93102

Hi,

Why the file "/media/jui/js/jquery-noconflict.js" is not included in your website ?

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 7
  • Thank you received: 0
11 years 8 months ago #93109

I don't know that. Should I need to include that? And where to include?
Thanks.

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

  • Posts: 26152
  • Thank you received: 4027
  • MODERATOR
11 years 8 months ago #93126

Hi,

Yes you need to include it.
I don't know how your template is structure, I don't know "who" make the inclusion of jQuery but the noconflict file should be include too !

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Time to create page: 0.088 seconds
Powered by Kunena Forum