Hi,
I have this code somewhere in my plugin:
$('tr', $this).hover(function(){
var cur_color = null;
cur_color = $this.css('background-color');
$this.css('background-color', options.tr_hover_bgcolor);
}, function(){
$this.css('background-color', cur_color);
});
Above, $this
refers to wrapped set or table
as an example. The code is supposed to change the rows background color on mouse enter and mouse leave. It does not work when used inside the plugin. Outside the plugin the similar code just works fine. Also that is the only part of the code not working in the plugin, rest of the things are working fine.
This code works which is not a plugin:
$('#' + table_id + ' tr').hover(function(){
cur_color = $(this).css('background-color');
$(this).css('background-color', '#FFF3B3');
}, function(){
$(this).css('background-color', cur_color);
});
Can you please point out why above code doesn't work in the plugin?
Thanks