I am using the below code:
<div class="business-bottom-content" onMouseOver="javascript:this.className='business-bottom- content-hover';" onMouseOut="javascript:this.className='business-bottom-content';">
The jQuery script is as following:
$("div.business-bottom-content").click(
function()
{
alert('ashutosh mishra');
});
You probably define the div after the script has executed.
Wrap it in $(document).ready(function() { .... });
to ensure it executes after the full DOM is available.
Additionally you should get rid of those ugly inline events (if you even need them - you can use :hover
in CSS):
$('div.business-bottom-content').hover(function() {
$(this).addClass('business-bottom-content-hover');
}, function() {
$(this).removeClass('business-bottom-content-hover');
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With