A new concaution by John Resig called Sizzle has recently caught my eye. It’s a series of JavaScript files that you can add to your website to improve your CSS capabilities by adding advanced CSS3 selectors. Best of all it works in all major browsers including:
Sizzle Browser Support
Firefox 2.0+
Internet Explorer 6+
Safari 3+
Opera 9+
Chrome 1+
By using this library you can effectively do more with less CSS code, and even replace some of your JS and server-side logic.
A Few Common Usage Scenarios
Striping table rows (table tr:odd, table tr:even, etc.)
Grab specific form fields (input:checkbox, input:radio, etc.)
Grab the first or last items in a list (#navigation li:last, #navigation li:first)
Grab the first item in a region (div p:first)
By using Sizzle you’ll also become familiar with CSS3 selectors you’ve probably never used, and will likely use in the future. In an ideal world we would all take the time to learn these and use them in our everyday work, but more often than not it’s simple not possible because of older browser’s and their lack of support (Internet Explorer). By providing full support of CSS3 in Internet Explorer 6 and up, Sizzle helps to solve this issue.
Other Features
Provides meaningful error messages for syntax errors
Optimized for performance – only 4KB when gzipped and minified
Completely standalone (no JavaScript library needed)
Created by a rock solid JavaScript developer, expect to see enhancements well into the future.
I haven’t yet used Sizzle, but based on most of John’s other work I think it sounds pretty promising. I’ll be playing around with it in furure work, if anyone has anything to add please do.
A new con-caution by John Resig called Sizzle has recently caught my eye. It’s a series of JavaScript files that you can add to your website to improve your JS Selector capabilities, adding advanced CSS3 selectors to jQuery and other JavaScript libraries.
Sizzle Browser Support
- Firefox 2.0+
- Internet Explorer 6+
- Safari 3+
- Opera 9+
- Chrome 1+
By using this library you can effectively do more with less CSS code, and even replace some of your JS and server-side logic.
A Few Good Reasons
By using Sizzle you’ll also become familiar with CSS3 selectors you’ve probably never used, and will likely use in the future. In an ideal world we would all take the time to learn these and use them in our everyday work, but more often than not it’s simple not possible because of older browser’s and their lack of support (Internet Explorer). By providing full support of CSS3 in Internet Explorer 6 and up, Sizzle helps to solve this issue.
Other Features
- Provides meaningful error messages for syntax errors
- Optimized for performance – only 4KB when gzipped and minified
- Completely standalone (no JavaScript library needed)
- Created by a rock solid JavaScript developer, expect to see enhancements well into the future.
I haven’t yet used Sizzle, but based on most of John’s other work I think it sounds pretty promising. I’ll be playing around with it in furure work, if anyone has anything to add please do.