Home >Web Front-end >HTML Tutorial >Toolstip of jq ui I just want input to have prompt_html/css_WEB-ITnose
As the title says, I just want a hint,
$(document input).tooltip(); Is it possible to write it like this? What should I do?
<script type="text/javascript" src="/Scripts/jquery-ui-1.10.3.custom/js/jquery-ui-1.10.3.custom.js"></script> <link rel="stylesheet" type="text/css" href="/Scripts/jquery-ui-1.10.3.custom/css/ui-lightness/jquery-ui-1.10.3.custom.css" /> <script type="text/javascript"> $(function () { $(document).tooltip(); }); </script><input type="submit" value="搜索(S)" accesskey="S" title=“test”>
Just after asking, I thought of a way
<script type="text/javascript"> $(function () { $(document).find("input").tooltip(); }); </script>
The selector is not written correctly
The selector is not written correctly
What you are talking about is this $(document input).tooltip( );?
$(document).tooltip();
If you write like this, you are adding a tooltip to the entire document. You need to narrow the scope.
$('input' ).tooltip();
$(document).tooltip();
If you write like this, you are adding a tooltip to the entire document. You need to narrow the scope.
$('input').tooltip();
Oh, thank you very much!