Skip to content

Instantly share code, notes, and snippets.

@appkr
Created January 29, 2015 05:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save appkr/ea93612c8696eab161c0 to your computer and use it in GitHub Desktop.
Save appkr/ea93612c8696eab161c0 to your computer and use it in GitHub Desktop.
jQuery Plugin // source http://jsbin.com/xuziwa
<!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>
.example {
width: 50px;
height: 50px;
background-color: #000;
}
(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