Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2014-10-29 12:00:53
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,308
[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
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
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)
Digital nomad, sailing the world on a sailboat: 32fthome.com
Offline
#4 2014-10-29 13:18:28
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,308
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
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,308
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
Pages: 1