ATTENTION:

This support forum has been decommissioned and replaced with our new support forum. If you need technical assistance, please post your questions here.

Premium Plugin Support » Bug Reports »
Themeforest Jquey Fiasco, How to Load Jquery When Needed Post topic
Joined: 2010-07-17 03:30:38
Comments: 2373
Location: Salt Lake City Utah

Posted on: January 12, 2011 7:36 PM

I love Themeforest themes, but some of the themes they sell are loaded with tons of Jquery scripts that no one hardly ever uses. It seems to me these developers are just filling themes with whatever useless scripts they can find, just so they can sell their themes for a higher price.

I wish these theme developers would start going by the WordPress standards and start loading Jquery the right way!

Take a look at this image for example. All of this code was killing someones installation of Event Espresso:

All of that extra code is just asking for trouble. It will probably break almost every plugin known to man, that even thinks about using Jquery.

In order to get Event Espresso working properly. I added a WordPress conditional tag around all of the extra code. So in other words, if your registration page is loaded, then all of the other scripts are not loaded. Only a few of the menu scripts are loaded along with the Event Espresso scripts.

The WordPress conditional I used looks something like this:

________________________
Are you a WordPress developer? Event Espresso is hiring. Apply now!
Report as:
Message (optional):

Close Form
Joined: 2010-07-17 03:30:38
Topics: 2
Replies: 3


Posted on: December 14, 2011 at 7:48 pm

Hi Seth:
I’m pretty sure this is what’s causing an issue with the drop down menu on a site I’m working on:
http://franklinton.angiemeekerdesigns.com/event-registration

When on the Event Registration page, the drop down menu functions differently than it does otherwise, making it difficult to choose the child pages, and the parent pages hover css changes to something that is almost reverse that of what it actually is.

Do you think that’s the issue? If so, how can I be sure where to put your fix within my files?

Angiee

Report as:
Message (optional):

Close Form
Report post
Joined: 2010-07-17 03:30:38
Topics: 70
Replies: 2373
Location: Salt Lake City Utah

Posted on: December 14, 2011 at 10:19 pm

@Angie

What version of EE and WP is this?


Are you a WordPress developer? Event Espresso is hiring. Apply now!
Report as:
Message (optional):

Close Form
Website Report post
Joined: 2010-07-17 03:30:38
Topics: 2
Replies: 3


Posted on: December 15, 2011 at 6:17 am

WP 3.3
EE 3.1.15.P

Report as:
Message (optional):

Close Form
Report post
Joined: 2010-07-17 03:30:38
Topics: 7
Replies: 5608
Location: Traverse City MI

Posted on: December 15, 2011 at 9:27 am

Hi Angie,

I took a look at the superfish menu script in the custom.js file. It’s throwing an error, most likely because of using the $ shorthand. You could try replacing the $ with jQuery, or wrapping this function in a no-conflict wrapper. Here’s a guide that explains this better that I can: http://digwp.com/2011/09/using-instead-of-jquery-in-wordpress/

You might also consider switching the jQuery library that’s being used to the standard version that ships with WordPress.


Event Espresso Support Tech
Event Espresso Documentation can be found here→
Report as:
Message (optional):

Close Form
Report post
Joined: 2010-07-17 03:30:38
Topics: 2
Replies: 3


Posted on: December 21, 2011 at 8:24 am

Lovely. The wrapper worked.

Report as:
Message (optional):

Close Form
Report post
Joined: 2010-07-17 03:30:38
Topics: 7
Replies: 5608
Location: Traverse City MI

Posted on: December 21, 2011 at 8:31 am

Awesome, glad to hear you’ve got it worked out.


Event Espresso Support Tech
Event Espresso Documentation can be found here→
Report as:
Message (optional):

Close Form
Report post

ATTENTION:

This support forum has been decommissioned and replaced with our new support forum. If you need technical assistance, please post your questions here.