Created
January 29, 2015 05:14
-
-
Save appkr/ea93612c8696eab161c0 to your computer and use it in GitHub Desktop.
jQuery Plugin // source http://jsbin.com/xuziwa
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script> | |
<meta name="description" content="jQuery Plugin" /> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
.example { | |
width: 50px; | |
height: 50px; | |
background-color: #000; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="example"></div> | |
<script id="jsbin-javascript"> | |
(function($) { | |
$.fn.callOut = function(options) { | |
var defaults = {duration: "fast"}, | |
options = $.extend(defaults, options); | |
this.css({opacity: 0.5}).animate({opacity: 1}, options.duration); | |
}; | |
})(jQuery); | |
$(".example").callOut({duration: 3000}); | |
</script> | |
<script id="jsbin-source-html" type="text/html"><!DOCTYPE html> | |
<html> | |
<head> | |
<script src="//code.jquery.com/jquery-1.11.1.min.js"><\/script> | |
<meta name="description" content="jQuery Plugin" /> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<div class="example"></div> | |
</body> | |
</html></script> | |
<script id="jsbin-source-css" type="text/css">.example { | |
width: 50px; | |
height: 50px; | |
background-color: #000; | |
}</script> | |
<script id="jsbin-source-javascript" type="text/javascript">(function($) { | |
$.fn.callOut = function(options) { | |
var defaults = {duration: "fast"}, | |
options = $.extend(defaults, options); | |
this.css({opacity: 0.5}).animate({opacity: 1}, options.duration); | |
}; | |
})(jQuery); | |
$(".example").callOut({duration: 3000});</script></body> | |
</html> |
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
.example { | |
width: 50px; | |
height: 50px; | |
background-color: #000; | |
} |
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
(function($) { | |
$.fn.callOut = function(options) { | |
var defaults = {duration: "fast"}, | |
options = $.extend(defaults, options); | |
this.css({opacity: 0.5}).animate({opacity: 1}, options.duration); | |
}; | |
})(jQuery); | |
$(".example").callOut({duration: 3000}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment