Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-09-02 21:06:18

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

[Solved] jQuery 1.3.2 changes?

js snippets like

	$(document).ready(function(){
		$('a.external').click(function() {
			window.open(this.href);
			return false;
		});
	});

or

	$(document).ready(function() {
		$('div.toggle:eq(0)> div').hide();
		$('div.toggle:eq(0)> h4').click(function() {
			$(this).next().slideToggle('fast');
		});
	});

all stopped working in 4.2.0. When I replace jQuery 1.3.2 with 1.2.6 they all work again. Do I need to change something in the scripts?

Last edited by els (2009-09-02 22:55:53)

Offline

#2 2009-09-02 21:49:58

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: [Solved] jQuery 1.3.2 changes?

Hi Els,
it seems it is being investigated here


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#3 2009-09-02 21:54:06

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,250
Website GitHub

Re: [Solved] jQuery 1.3.2 changes?

Odd, can’t see anything obvious based on the changes in the release notes that would compromise the code above. Don’t suppose Firebug’s Console gives any hints does it?


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#4 2009-09-02 22:23:48

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: [Solved] jQuery 1.3.2 changes?

maniqui wrote:

it seems it is being investigated here

Yes, I saw that, but that thread is about plugins and I didn’t know if this is related.

Bloke wrote:

Don’t suppose Firebug’s Console gives any hints does it?

I must confess that I don’t understand Firebug at all… :-( but what it says when using jQuery 1.3.2 is this:

[Exception... "'Syntax error, unrecognized expression: [@href*="#"]' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "<unknown>" data: no]

Offline

#5 2009-09-02 22:55:12

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: [Solved] jQuery 1.3.2 changes?

I wrote:

[@href*="#"]

…and I was convinced I didn’t have that anywhere on my page. But I just located it in a separate .js file. Removing the @ made all other scripts work again too :)

Thanks Stef and Julián for the hint.

Last edited by els (2009-09-02 23:02:42)

Offline

#6 2009-12-08 16:02:54

candyman
Member
From: Italy
Registered: 2006-08-08
Posts: 684

Re: [Solved] jQuery 1.3.2 changes?

I have problems with the nice Galleria script that stopped working with jQuery 1.3.2: replacing it with the 1.2.6 version the gallery worked again.
I’ve already deleted the deprecated “@” in the code with no results: what else should I check?

Last edited by candyman (2009-12-08 16:03:33)

Offline

#7 2009-12-08 16:11:40

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,250
Website GitHub

Re: [Solved] jQuery 1.3.2 changes?

candyman wrote:

what else should I check?

A quick Google search turned up this. There’s some code edits in that thread about halfway down that someone claims works. Any use?


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#8 2009-12-08 16:27:28

candyman
Member
From: Italy
Registered: 2006-08-08
Posts: 684

Re: [Solved] jQuery 1.3.2 changes?

Thanks Bloke, the forum discussion was useful: fixed!

Offline

Board footer

Powered by FluxBB