How to hide/show a DIV, with a cursor hover
Hi Guys,
I'm very new to JQuery. I have created a script that shows a hidden DIV when the user clicks on a text title. However when you hover on the title, you don't get any mouse feedback because it's not a hyperlink. So I would like to add some sort of hover effect to #title so it that changes to the mouse pointer to hand to simulate a hyperlink.
This is the code I currently have:
<script type="text/javascript">
$(document).ready(function(){
$('#title').click(function () {
$('#show').slideToggle();
});
});
</script>
Can anyone offer guidance on what needs to be added to this, so that the mouse changes on hover? I have found the below code, but don't know if it's correct or where to put it.
$('#title').hover(function() {
$(this).css('cursor','pointer');
Or am I just better off using the CSS display option to change the pointer to a hand? Not sure how browser compatible that is.
Thanks so much.
Glyph