Archive

Archive for March, 2012

jQuery .is method.

March 26th, 2012 No comments

This is probably the best way I’ve seen to see if a checkbox is checked or not on a click event…

jQuery(this).is(‘:checked’);

Some more awesome jQuery checkbox reference material: http://gaskell.org/determining-if-a-checkbox-is-checked-with-jquery/

Categories: jquery Tags:

Escape CSS Selector

March 26th, 2012 No comments

Frequently, I am composing css selectors for jQuery dynamicly and need to escape special characters. ¬†Especialy in CakePHP when you are trying to get all inputs with a name like “data[Contact][firstName]”.

Karl Varga has a solution –¬†http://kjvarga.blogspot.com/2009/06/jquery-plugin-to-escape-css-selector.html

Thanks Karl!

Categories: css, javascript Tags: