Welcome, Guest
Username: Password: Remember me
Use this Category for your support questions about Virtuemart Template - CleanMart (SKU# FLEX-00015)

TOPIC: [SOLVED] YooTheme Conflict. TypeError: d.on is not a function

[SOLVED] YooTheme Conflict. TypeError: d.on is not a function 10 years 2 months ago #8376

Hi there,

I just bought the new Cleanmart from here and since I installed it the menu is no longer showing dropdowns.

114.23.32.240/~wwwsafet/index.php/products/footwear

I guess its a javascript issue. Is there anything I can do/edit to fix this? I am using yootheme_glass

Thanks
Last Edit: 10 years 2 months ago by Support.
The topic has been locked.

Menu not working after installing template 10 years 2 months ago #8384

Hi,

Your website has 2 console errors that essentially caused by usage of .on() jquery function.

Attachment ScreenShot2014-02-04at9.28.33PM.png not found



Here is why:

Yootheme templates are using .on() function and this function is introduced with jQuery1.7 (works with jquery1.7 and newer versions)

Attachment Pasted_Image_2_3_14__12_34_PM-2_2014-02-04.png not found


More info: api.jquery.com/on/

But (officially) Virtuemart loads jQuery 1.6.4,

Attachment Pasted_Image_2_4_14__9_29_PM-5.png not found



Since Virtuemart loads jQuery1.6.4; we have developed our templates based on this jQuery version as well, but YooTheme didn't. The source of the problem is the fault using of .on() because your website loads older than jQuery1.7 version.

There are 2 solutions for this case, either of them will solve the problem:

Solution #1- The .on() function must be replaced by .live() where it is presented (in widget-kit JS files and warp.js file). Nothing will be changed in the front-end. Because .on() and .live() do the same exact things.

Solution #2: The jQuery that gets loaded by Virtuemart, will be upgraded to jQuery1.7.2 and this won't conflict with the .on().

The 2nd solution is more reliable, as the 1st solution requires little JS knowledge.

To apply the 2nd solution, there are also 2 ways;

1- Open this PHP file:
/administrator/components/com_virtuemart/helpers/config.php

find this line:
if(VmConfig::get('google_jquery',TRUE)){
			vmJsApi::js('jquery','//ajax.googleapis.com/ajax/libs/jquery/1.6.4','',TRUE);
and replace it with this:
if(VmConfig::get('google_jquery',TRUE)){
			vmJsApi::js('jquery','//ajax.googleapis.com/ajax/libs/jquery/1.7.2','',TRUE);

2- Read this topic: www.flexiblewebdesign.com/forum-virtuemart-2-template-puremart-support/523-the-easiest-way-to-solve-jquery-conflict-issues
install the jQuery Easy plugin and choose jQuery1.7 from the plugin parameters.


I tried to explain every single detail about this problem and also provide the solution attempts you might go with to tackle this situation, choose the method that is suitable to you.
I would suggest you to go with the jQueryEasy plugin (the last option), because it is the best and easiest way to solve it.

Regards,
Support
The topic has been locked.

Menu not working after installing template 10 years 2 months ago #8397

worked perfectly for option 2

Thanks again
The topic has been locked.

Menu not working after installing template 10 years 2 months ago #8422

Sure, your welcome.

Case solved. Topic is closed.

If you like our template and satisfied with the support you have received, please "write a review" on:
flexiblewebdesign.com/Virtuemart-2-Templates/CleanMart



Attachment Pasted_Image_2_8_14__2_17_AM-4_2014-02-08.png not found





Rate the product and write a couple of sentences to share your experience with our support team. It won't take more than 2 minutes from you but it is extremely important for us. Thanks in advance!


Regards,
Support
Last Edit: 10 years 2 months ago by Support.
The topic has been locked.
Time to create page: 0.132 seconds

MaterialMart

for Virtuemart 3

Google's Material Design has finally arrived to Virtuemart

Virtumart Template - MaterialMart Virtumart Template - CleanMart Virtumart Template - CleanMart Virtumart Template - CleanMart

Fully responsive!

Buy Now   |   Live Demo