> $.fn.border = function(prefix){
> var classNames = [ 'north', 'east', 'south', 'west', 'northeast',
'southeast', 'southwest', 'northwest'];
> return this.each(function(){
> for (var index in classNames){
> className = (prefix || '')+ classNames[index];
> $(this).wrap("<div class='" + className + " block'></div>")
> }
> })
> };
Danger warning! Don't use for..in on an array! Use a C-style loop instead.
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/