Im trying to devlop a jquery menu plugin, based on UL and LI tags.
this is the really basic plugin:
(function($){
$.fn.extend( {
verticalfade: function(options){
var defaults = {
speed: 'normal'
};
var options = $.extend(defaults, options);
return this.each(function(){
$(this).css('cursor', 'pointer');
});
}
});
})(jQuery);
now i would link to understand how to define a click function for the li element, and how to use .addClass(), .removeClass() and .mouseover() over the li elements, specially how to add a class to the LI i am over and at the same time remove the class from all the other li.
this is the simple html head
<script src="javascript/jquery.verticalfade.js" type="text/javascript"></script>
<link rel="stylesheet" href="verticalfade.css" />
<script type="text/javascript">
<!--
// jquery initialize:
$(function() {
$('#verticalfade').verticalfade();
});
//console.log();
-->
and this the body
<ul id="verticalfade">
<li>First</li>
<li>Second</li>
<li>Thirs</li>
</ul>
while the css
.outText{color:#cccccc;}
.inText{color:#ffffff;}
i qould link al the li to receive the .outText class while the overmouse li only the .inText
Thank you!