javascript - Why I'm not able to show the image in Bootstrap tool-tip? -
i'm using bootstrap framework v3.3.0 website.
i want show on image tool-tip when user hovers mouse pointer on icon. i'm having following html :
<div class="col-sm-5"> <div class="input-group"> <input type="text" class="form-control" name="trans_id" id="trans_id"/> <span class="input-group-addon"> <a href="#" class="glyphicon glyphicon-question-sign" rel="tooltip" data-html="true" title="localhost/img/demo_img.png"></a> </span> </div> </div>
jquery code follows :
$(document).ready(function() { $('.input-group-addon').tooltip({ selector: "a[rel=tooltip]" }) });
on hovering i'm not able display image. text mentioned in title(i.e. complete image location path displayed tool -tip.)
all necessary css , jquery files included.
please me in regard.
thanks in advance.
the html parameter boolean, need set true with
<a data-html="true" ...etc... >
then need use title supply yout html content:
<a data-html="true" title="<img src='...' />" ...etc... >
bootstrap 3 docs here:
http://getbootstrap.com/javascript/#tooltips-usage
jsfiddle example here:
Comments
Post a Comment