EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: rezzonico on June 05, 2014, 05:24:26 AM



Title: Creating Tooltip "on the fly"
Post by: rezzonico on June 05, 2014, 05:24:26 AM
Hi all,

I am trying to create a Tooltip "on the fly".

As you can see in the following link (http//:195.144.40.170/AAA/file.html (http://195.144.40.170/AAA/file.html))
"Tooltip 1" works correctly but "Tooltip 2" not.
Note that "Tooltip 2" is created "on the fly".

Here is the code.
Any help is appreciated.
Regards. Miche

Code:
<link id="dlink" rel="stylesheet" type="text/css" href="easyui.css">
<link rel="stylesheet" type="text/css" href="icon.css">
<script type="text/javascript" src="jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="jquery.easyui.min.js"></script>

<script type="text/javascript">
   $(function(){
      $('#tt2').html('<a title="NOT correct" class="easyui-tooltip" href="#">Tooltip 2</a>');
   });
</script>

<div id="tt1">
<a title="correct" class="easyui-tooltip" href="#">Tooltip 1</a>
</div>

<br><br>

<div id="tt2">
</div>


Title: Re: Creating Tooltip "on the fly"
Post by: aswzen on June 08, 2014, 06:56:30 PM
put the js loader on the end of code