var indicator = { messages :{ valid : "It is a Valid Change", invalid : "It is an Invalid Change", invalidEmpty : "You can not have an empty Name" }, tooltipMessage : function(){ var self = this; $('table td').on('mouseover',function(e) { var div = $(this).find(".valid_message_box"); if(div){ if($(this).hasClass("is_valid ")){ $(div).html(self.messages.valid).show(); return; } if($(this).hasClass("is_invalid")){ var dataCell = $(this).text(); dataCell == "" ? $(div).html(self.messages.invalidEmpty).show() : $(div).html(self.messages.invalid).show(); return; } } //$(".valid_message_box").css('top', $(this).position().top - 30).css('left', $(this).position().left + $(this).width()); }); $('table td').on('mouseout',function(e) { $(this).find(".valid_message_box").hide(); }); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)