Created
March 23, 2015 08:46
-
-
Save andreascarpello/0ebad3ea39d70f3fe200 to your computer and use it in GitHub Desktop.
Dottify plugin, Add dotted pattern to div element
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Add dotted pattern to div element | |
* usage: $('div').dottify(); | |
*/ | |
$.fn.dottify = function() { | |
var container = this.parent(); | |
this.css('position', 'relative'); | |
var dottedBG = $('<div/>', { | |
'class': 'dotted-bg', | |
}); | |
dottedBG.appendTo(this); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment