Quote:
Originally Posted by wayfarer07
I don't see anything wrong with what you've written. However, if you want to bind events to both the over and out state event, it is easier to use the jQuery.hover() shortcut:
Code:
$('input').hover(function() {
alert('Over');
},
function() {
alert('Out');
});
Are you doing anything else wrong with your page? Is the path to jQuery correct? Is the code in correct placement to have an affect on the INPUT elements you intend to target? Is it either below them or inside of a $(document).ready()?
|
So that works.
OK. Now I really need some help.
This is what I want to do:
I have a form with input fields and those fields all have "title" attributes.
For reasons which arent important to this discussion I can't get rid of the
"title" attributes themselves, but I don't want the tooltips to show on hover.
To best of my knowledge there is no way to suppress tooltips using CSS.
So that leaves a JQuery solution.
What I want to do is to remove the "title" attribute on hover (so there is nothing for the tooltip to show) but put it back again on hoverout.
So in the above example, in place of alert('over') and alert('out') what should I substitute?
I figure that the title needs to stored as a variable at some point.
But is it possible to pass that variable to the other part of the function, the part that puts the "title" attribute back in place?
|