Forum Moderators: open

Message Too Old, No Replies

Class is not detected by updated jQuery

         

toplisek

3:14 pm on Mar 3, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Error: Error: Syntax error, unrecognized expression: class*="col-
Source File: jquery_1.11.2.min.js
I'm using
@media (max-width:480px) {
#grid1 [class*="col-"] {width:100%;}
}

It seems it does not detect class name in the correct way. How to solve this?

Fotiman

5:05 pm on Mar 3, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



What does your jQuery line look like, though? Should be something like:
$('#grid1 [class*="col-"]')

toplisek

8:03 pm on Mar 3, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



$grid.shuffle(
{
itemSelector: 'class*="col-',
sizer: $sizer
}
);

Fotiman

8:23 pm on Mar 3, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I'm not familiar with shuffle, but I suspect your itemSelector needs to be:
'[class*="col-"]'

toplisek

9:05 pm on Mar 3, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I have tried. Your suggestion works without any error. Probably it is correct.