php - Bootstrap popover with <div></div> and contents with "" -
i implemented bootstrap popover after trying...
now want implement html popover. normal tags <p align=center>some text</p>
working, if add together quotes, doesen't work anymore:
<a href="link" rel="popover" data-content="<img src="pathtosource/img.png">" data-placement="top">...</a>
then tried this:
<a href="link" rel="popover" data-content="<img src=\"pathtosource/img.png\">" data-placement="top">...</a>
i tried replace content of data-content-attribute <?php echo '...' ?>
didn't work too.
can help me please?
edit: actual code
<a href="myfacebookpage" rel="popover" data-content='<div style="width: 100px; height: 200px;" class="fb-like" data-href="myfacebookpage" data-layout="box_count" data-action="like" data-show-faces="true" data-share="true"></div>' data-placement="top" target="_blank"> <img src="theusedicon" </a>
in options popover you'll note states utilize html alternative set true, because if false, jquery's text method used insert content dom. warns default value false, , should utilize text if you're worried xss attacks.
so, seek writing link way instead:
<a href="myfacebookpage" rel="popover" data-content='<div style="width: 100px; height: 200px;" class="fb-like" data-href="myfacebookpage" data-layout="box_count" data-action="like" data-show-faces="true" data-share="true"></div>' data-placement="top" target="_blank" data-html="true"> <img src="theusedicon"> </a>
php html twitter-bootstrap
No comments:
Post a Comment