I am trying to setup a filter in isotope that will filter by only the first letter of text in an tag. Any help is appreciated! (new to javascript!)
Asked
Active
Viewed 1,186 times
1 Answers
0
Can you use regular expressions?
$('#container').isotope({ filter: '^[^\*]' });
•The first ^ means "at the start of the string" The [ ... ] construct is a character class, which matches a single character among the ones enclosed within the brackets
•The ^ in the beginning of the character class means "negate the character class", i.e. match any character that's not one of the ones listed
•The * means a literal *; * has a special meaning in regular expressions, so I've escaped it with a backslash.
Src= Javascript regexp - only if first character is not an asterisk
tag that begin with "A", how would I write out that out?
– user1883431 Dec 07 '12 at 01:25