Bootstrap Tooltip not working on input field -
i,m using tooltip in rails app not working on input field code is:
%input#main-search{:name => "query", :placeholder => "search items", :rel => "tooltip", :title => "search items", :type => "text"} :javascript $(document).ready(function(){ $('input[title]').tooltip({placement:'bottom'}); }); i use:
$('#main-search').tooltip({'trigger':'focus'}); its not work input field label works fine. how can inable tooltip input field?
here valid html markup tooltip:
<input data-toggle="tooltip" title="tooltip on second input!" type="text" placeholder="focus me!" name="secondname"/> and here jquery right placement tooltip , trigger on focus:
$('input[type=text][name=secondname]').tooltip({ /*or use other selector, class, id*/ placement: "right", trigger: "focus" }); and here working demo: http://jsfiddle.net/n9vn8/69/
Comments
Post a Comment