Monday, May 16, 2016

jQuery - select by multiple attributes - whitespaces are very important!

If you want to fetch this element:

<p data-t1='a' data-t2='b'></p>

You need this code:

jQuery([data-t1=a][data-t2=b])

instead of:

jQuery([data-t1=a] [data-t2=b])

The later would return 0 elements

No comments:

Post a Comment

Ubuntu 12.04, 14.04, 16.04 - auto start an app or script before login

To run a command or application at startup, even before the user has logged in, you can use this file: /etc/rc.local The commands entered...