I have a link which triggers div tag to toggle. The problem is that I don’t want my button(which is within the div), to toggle. How do I stop it from toggling?
This is my html code:-
<a href="#" id="uploadVideoLink" class="menuLink"> Upload Videos </a>
<div id="uploadVideos" class="menu">
<input name="submit" type="submit" value="Upload" id="btn" />
</div>
This is my jQuery code:-
$(document).ready(
function upload(){$("#uploadVideoLink").click(
function uploadTog(){$("#uploadVideos").toggle();}
);}
);
If you mean that you don’t want to hide the button that’s not possible i think as long as the button is inside the div becuase
toggle()assigndisplay: none;to the div thus hiding everything inside itOne thing you could do is this one (this would toggle all elements inside the div but not the button):
fiddle
http://jsfiddle.net/K5NL4/