5 replies [Last post]
Verschwindende
Verschwindende's picture
Offline
Guru
Last seen: 1 week 1 day ago
Timezone: GMT-4
Joined: 2009-10-09
Posts: 2051
Points: 2283

Well, it took me a while to figure it out. I tried to update my sites a while back to use jQuery 1.3.2 but for some reason it refused to work with my scripts. I just ended up putting 1.2.6 back in and forgetting about it for a few months.

I came back to it this evening and again got confused. I figured I should look at the documentation for changes. Apparently they deprecated the use of the @ sign in the [attribute] selector. Hrump. All I had to do was take out the @ and the rest of the script worked.

In case anyone else runs into updating 1.2.6 to 1.3.2 remove the [@attributes]. Wink

$(document).ready(
function() {
	$("a[@href^=\"http://\"]").attr({ title: 'external link' });
	$("a[@href^=\"mailto:\"]").attr({ title: 'email' });
	$("a[href$=.pdf]").attr({ title: 'PDF file' });
	$("a[rel^='prettyPhoto']").prettyPhoto();
	$("a.deleteButton").click(function() {
		return confirm('Are you sure you want to delete this?');
	});
	$(".cat").css('display', 'block');
	$("select#categoryFilter").bind("change", function() {
		this.form.submit();
	});
});
The @ in the first selector was stopping the function in its tracks disallowing anything else from occuring. Grr.

Tags:
Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 7 years 32 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Oh, could have told you that.

Oh, could have told you that. Tongue

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

Verschwindende
Verschwindende's picture
Offline
Guru
Last seen: 1 week 1 day ago
Timezone: GMT-4
Joined: 2009-10-09
Posts: 2051
Points: 2283

Yeah, I should have asked

Yeah, I should have asked here. Wink

It was a "hey, let's upgrade everything" sort of day. Turned into a "why isn't it working" day instead. Isn't it written in stone that you shouldn't break legacy code? Of course what fun would that be?

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 7 years 32 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Yeah I have those days,

Yeah I have those days, always tend to regret the time lost Smile

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

Verschwindende
Verschwindende's picture
Offline
Guru
Last seen: 1 week 1 day ago
Timezone: GMT-4
Joined: 2009-10-09
Posts: 2051
Points: 2283

Whoops, just realized 1.4 is

Whoops, just realized 1.4 is released.

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 7 years 32 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

rofl I hadn't the heart to

rofl I hadn't the heart to tell you, should be painless though Cool

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me