javascript - pass value to iframe on popover using jquery -
i have written code show popover iframe on hover link. want pass link value iframe window on popover. how can that? here code
<a href="#" class="show-pop-iframe btn btn-default " data-placement="vertical" id="sample" value="email@domain.com">email@domain.com </a> <a href="#" class="show-pop-iframe btn btn-default " data-placement="vertical" id="sample1" value="email1@domain1.com">email1@domain1.com </a> <div id="auto"></div>
(function(){ var settings = { trigger:'hover', title:'send mail user', content:'<p>this webui popover demo.</p><p>just enjoy , have fun !</p>', width:auto, multi:true, closeable:false, style:'', delay:300, padding:true, backdrop:false }; function initpopover(){ var iframesettings = { width:500, height:350, closeable:true, padding:false, type:'iframe', url:'http://localhost/live/liveuser.php' }; $('a.show-pop-iframe').webuipopover('destroy').webuipopover( $.extend({},settings,iframesettings) ); } initpopover(); })();
function initpopover(){ var iframesettings = { width:500, height:350, closeable:true, padding:false, type:'iframe' }; $('a.show-pop-iframe').webuipopover('destroy'); $.each($('a.show-pop-iframe'), function (key, element) { var url = 'http://localhost/live/liveuser.php'; url += '?' + encodeuri($(element).attr("value")); // link value in url webuipopover($.extend({url: url},settings,iframesettings)); } }
Comments
Post a Comment