this is what i do.
<input data-tooltip data-width="350" class="has-tip tip-left" title="enter name" type="text" /> <script> $(document).foundation();
the tooltip works fine when hovering over an input, but I want to call it focus. please help?
$(".has-tip").focus(function(){ $(this).foundation(); });
But make sure you can hide the tooltip. for this you can do it
$(".has-tip").blur(function(){ //may be you can hide the tooltip or call the hide function if any. });
Note. Challenges may vary according to jquery version.
Foundation.libs.tooltip.showTip( jQuery( ".has-tip" ) );
You might want to add #id to the range to make a more specific selector for the showTip function.
See: https://github.com/zurb/foundation/blob/master/js/foundation/foundation.tooltip.js
Demo
Try it.
$('input').focus(function() { $('div').show(); }).focusout(function() { $('div').hide(); });
Source: https://habr.com/ru/post/1203874/More articles:Running multiple elasticsearch nodes as a service on a single Ubuntu server - ubuntuhttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1203870/opengl-projecting-view-space-co-ordinates-to-ndcs-results-seemingly-outside-of-11-range&usg=ALkJrhhRjf394OvoKn7AGUjyYYI4R0TjJAHow can I compile the contents of nested rudders? - javascriptShow Foundation 5 Tooltip on Click - zurb-foundationWhat version of XPath is implemented in XML :: LibXML? - xmlCan I provide the lxml.etree.parse url in Python 3? - pythonXpath request when changing XML format - bashDoes the server need to install Microsoft Office to build solutions to build? - c #Why does 0.13.6 load Scala 2.10.4 by default? - sbtIncorporate (POSIX) libraries in deeply embedded source / make files - cAll Articles