wordpress - Pass through '&parameter' in a URL -


i'm working on project passes variable iframe code:

jquery(function() {     var search = window.location.search;     jquery(".iframe-wrapper").attr("src", jquery(".iframe-wrapper").attr("src")+search); }); 

but, when pass through &section=p1 in url, gives 404.

source of iframe: example.com/page?cart=1

after going site.com/&section=p1 iframe should change example.com/page?cart=1&section=p1

anyway pass through &section=p1 through url?

please send html mine working fine below:

  <iframe width="500" height="200" class="iframe-wrapper" src="http://www.google.com?param=1"></iframe>     <script type="text/javascript">      $(function() {     var search = window.location.search;     search = search.replace("?","&");      $(".iframe-wrapper").attr("src", $(".iframe-wrapper").attr("src")+search);     });     </script> 

Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -