I'm creating a custom jQuery plugin to add a few images above an input box. The highlight class are working perfectly, but I need help with the selectors on the .toggle() for showing and hiding the INPUTBANNER class.
jQuery.fn.inputmenu = function() {
function createInputMenu(node) {
$(node).bind('focus', function() {
$(this).parent().toggleClass('highlight');
//SHOW INPUTBANNER CLASS
$(this).parent().('.inputbanner').toggle();
});
$(node).bind('blur', function() {
$(this).parent().toggleClass('highlight');
//HIDE INPUTBANNER CLASS
$(this).parent().('.inputbanner').toggle();
});
$(node).parent().append('<div class="inputbanner">some images here</div>');
}
return this.each(function() {
createInputMenu(this);
});
};