Some example code for stripping out all non word characters. So only letters, underscores/spaces, and numbers. This would not be good for email sanitization, but could be good for other input fields. var search_term = $(‘.search_tag_input’).val(); // strip tags search_term = search_term.replace(/(<([^>]+)>)/ig,”"); //spaces as underscores search_term = search_term.replace(‘ ‘, ‘_’); //remove nonword characters (and underscores) [...]
tags: Javascript, jQuery, Notes author: admin comments: No Comments
John Resig has an excellent post on his blog about scroll events, efficiancy, and how that recently affected twitter. Below is some example code he wrote for working with scroll events.
tags: Javascript, jQuery, Notes, scrolling author: admin comments: No Comments
Drag the waves.Click the waves to disable mouse rotating. Flip the waves 90 degrees clockwise Flip the waves 90 degrees counter-clockwise Flip the waves 270 degrees clockwise (same as above) Flip the waves 26 degrees clockwise Flip the waves 84 degrees counter-clockwise Flip the waves 108 degrees counter-clockwise Flip the waves 180 degrees either direction [...]
tags: CSS, IE, Javascript, jQuery, Notes, rotation author: admin comments: No Comments
I’ve been using this little piece of code all over the place for months now. Tracked down the original use here: /* CLEARFIX !! — slightly enhanced, universal clearfix hack */ .clearfix:after { visibility:hidden; display:block; font-size:0; content:” “; clear:both; height:0; } .clearfix { display:inline-block; } /* start commented backslash hack \*/ * html .clearfix { [...]
tags: IE, IE6, Javascript, Notes author: admin comments: No Comments
if ($.browser.msie && parseInt($.browser.version)< 7) { //code goes here }
tags: IE, IE6, Javascript, jQuery, Notes author: admin comments: No Comments
This is an easy way to accomplish position:fixed; across all browsers using jQuery. Works in IE6. $(window).scroll(function() { $(‘#elementName’).css(‘top’, $(this).scrollTop() + “px”); });
tags: CSS, Javascript, jQuery, Notes author: admin comments: No Comments
So in some versions of IE, Suckerfish drop down menus show up behind Flash videos unless you add the WMODE parameters to the HTML code. Add the following parameter to the OBJECT tag: <param name=”wmode” value=”transparent”> Add the following parameter to the EMBED tag: wmode=”transparent”
tags: Flash, Notes, Suckerfish author: admin comments: No Comments
Or Business Development 2.0. This idea falls into the “ask for forgiveness, not permission” style of work, which I personally subscribe to. It’s an interesting article, my favorite paragraph is in the end: Traditional business development meant spending a lot of money on dry cleaning, animating your powerpoint, drinking stale coffee in windowless conference rooms [...]
tags: api, biz dev 2.0, flickr, Notes author: admin comments: No Comments
Joomla uses Mootools as a Javascript framework by default, and also has a light-box effect called Squeezebox built in by default. It’s quite easy to add Squeezebox functionality to your Joomla template.
tags: Javascript, Joomla, Mootools, Notes, Squeezebox, Templates author: admin comments: No Comments
This is going to be a list of web development tools that I use. Right now, it’s pretty small. Inspired by this page from elementiks.com. Templates: Bulletproof Templates – Joomla Blank Skeleton Templates Sandbox by Plaintext – WordPress Blank Skeleton Template jQuery: Visual jQuery jQuery API
tags: CSS, Javascript, Joomla, jQuery, Notes, PHP, Templates author: admin comments: No Comments