Hello I currently work on a feature for messages my system framework.
I just can not create options.
(function($){
var settings;
$.fn.MsgColor = function(options){
var settings = {
startWidth = function(){this.width(0)},
endwidth : null,
startHeight = function(){this.height(0)},
endHeight = : null
};
$(this).hide();
if(options) {
$.extend(settings, options);
}
$(this).show('slow',function(){
$(this).startWidth.startHeight.animate({'width':'+=60%'}, 2000)
.animate({ backgroundColor: "#ff7979", color:'#FFFFFF',
opacity: 0.8 },
{queue: false, duration: 2000})
.animate({ 'height':'+=25px' }, 2000)
.css({fontWeight:'bold',padding:'5px'});
setTimeout(function(){
$(this).stop();
}, 2000);
});
}
})(jQuery);
in html :
<script type="text/javascript">
$(document).ready(function() {
$('.test').click(function(){
$('#msg').MsgColor();
});
});
</script>
</head>
<body>
<div class="test">test</div>
<div id="msg">test</div>
</body>
</html>
ps: sorry for my english &-(
--
View this message in context:
http://www.nabble.com/prob-my-function-msgcolor-tp20427606s27240p20427606.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.