Link to home
Create AccountLog in
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
ASKER CERTIFIED SOLUTION
Avatar of Tom Beck
Tom Beck
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account