Avatar of egoselfaxis
egoselfaxis
 asked on

How can I fix this javascript function to be compatible with JQuery v1.11.3 ?

I'm in the process of re-building a site that was using an old version of JQuery, and I'm noticing that since I've upgraded to JQuery version 1.11.3, .. some of the functions appear to have been deprecated ... at least 1 in particular:

For example .. this one function is throwing an error ( ie: Error: Syntax error, unrecognized expression: a.[id^='enlarge'] ):

$("a.[id^='enlarge']").each(function(i) {
	if ($(this).attr("href") != "#") {
		var thisid = $(this).attr("id").replace(/enlarge/, '');
		uploader[thisid].disable();
	}
 });

Open in new window


How can I re-write this code snippet so that it's compatible with JQuery v1.11.3 ?

Thanks,
- Yvan
jQueryJavaScriptWeb Development

Avatar of undefined
Last Comment
Tom Beck

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Tom Beck

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy