Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2014-10-29 12:00:53

Gallex
Member
Registered: 2006-10-08
Posts: 1,289

[SOLVED] jquery options

hi,

i would like to add options for jquery code described here

but it doesn’t work like this:

    $('.nav').bigSlide({
                menu: ('#mobile-menu'),
                push: ('.push'),
           	menuWidth: 15.6em,
		side: right,
		speed: 300,
	});

how would be corret?

without options:

$('.nav').bigSlide();

it works

Offline

#2 2014-10-29 12:11:34

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

Re: [SOLVED] jquery options

You may need to remove the trailing comma on the last option. Firebug or a browser’s Javascript console should help you debug things like this.


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

#3 2014-10-29 12:55:42

trenc
Plugin Author
From: Malmö
Registered: 2008-02-27
Posts: 572
Website GitHub

Re: [SOLVED] jquery options

Try setting all names and the values for »menuWidth«, »side« and »speed« in quotes:

$('.nav').bigSlide({
	'menu':      ('#mobile-menu'),
	'push':      ('.push'),
	'menuWidth': '15.6em',
	'side':      'right',
	'speed':     '300'
});

Last edited by trenc (2014-10-29 12:59:06)

Offline

#4 2014-10-29 13:18:28

Gallex
Member
Registered: 2006-10-08
Posts: 1,289

Re: [SOLVED] jquery options

quotes were missing. ;) worked with and without trailing comma

$('.nav').bigSlide({
	menu:      ('#mobile-menu'),
	push:      ('.push'),
	menuWidth: '15.6em',
	side:     'right',
	speed:    '300',
});

thank’s guys!

Offline

#5 2014-10-29 13:26:11

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

Re: [SOLVED] jquery options

Gallex wrote #285213:

worked with and without trailing comma

Useful to know. jQuery used to be fussy. Or maybe just certain plugins were fussy. Glad you got it sorted.


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

#6 2014-10-29 13:49:18

Gallex
Member
Registered: 2006-10-08
Posts: 1,289

Re: [SOLVED] jquery options

Bloke wrote #285209:

Firebug or a browser’s Javascript console may well help you debug things like this.

having both (firebug, chrome’s javascript console), but can’t “read” them. either didn’t say: ‘quotes are missing!’

Offline

Board footer

Powered by FluxBB