views:

58

answers:

2

hi, im trying to use jquery tools tooltip (http://flowplayer.org/tools/tooltip.html#events%29on a form to show hints to the user.

the hints come up on every single input field, even submit button. i would like to disable the hints on some inputs of the form. when i remove the title element from the input tag, the the hint still comes up.

does anybody have experience with this?

thank you

A: 

From the Configuration section

// selectors 
$("<trigger_selector>").tooltip({ 
    /* tooltip configuration goes here */ 

    // one configuration property 
    position: "bottom left", 

    // another property 
    opacity: 0.7, 

    // ... the rest of the configuration properties 
});

just specify a selector that does not include the inputs that you do not wish the tooltip to appear on. You could do this by giving a class to those inputs that you do wish it to appear on and then do

$("#form-id input.tooltip").tooltip({ /* tooltip configuration  */  });

where form-id is the id of your form and tooltip is the class name on <input> elements that you wish the tooltip to appear on

Russ Cam
great! thank you for your answer. it took me a while until i got my head around the double negative but eventually it worked :)
ondrobaco
i referenced the id(s) of the inputs that i want the hint with as the class was already used for something.
ondrobaco
if the class is already used for something, then just pick another class name :) Using ids is fine, although probably less readable and perhaps harder to maintain if you add more inputs to the form that you want the tooltip on, you will have to edit the selector each time, as opposed to simply adding the class to the newly added element.
Russ Cam
A: 

use the correct selectors

Natrium