Ok so I found an issue with using embed code and jquery's show()/hide
() method. I am using embed code inside of a div. so it looks
something like this:

<div id="test">
<embed>
whatever here
</embed>
</div>

now on that I want a user to be able to click a button to show/hide
the content. so i create a function like this:

<script type="text/javascript">
function showEmbed(){
     if($("#test").show()){
          $("#test").hide();
     } else {
          $("#test").show();
    }
}
</script>

I then binded that to just a basic text link:

<a href="javascript:void(0);" onclick="showEmbed();">show/hide</a>

Now that works fine as far as showing/hiding the embed code. However,
there is one issue with this. When I click the link it reloads the
data. I do not want it to reload the data. Say for instance there is a
video playing in there. If you click the link it will stop the video
and when you click it again to show it will start again. Any ideas on
how to get it not to reload the data. Am I missing something?

Reply via email to