$.fn.currentActive = function(_className, _imgToggle) {
_className = _className || 'active';
var $this = $(this),
$parent = $this.parent('li'),
$el = ($parent.length) ? $parent : $this,
$siblings = $el.siblings(),
$img = $('img', $el).eq(0);
$el.addClass('active').siblings().removeClass('active');
if ($img.length && _imgToggle !== false) {
$img.imgToggle('_on');
$siblings.find('img').imgToggle('_off');
}
return this;
};
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.