The code that I attached below seems to be doing his thing, but when I include it in my Wordpress site it just won't work. So is there anything in particular that I should do to include it properly? I even tried to add it through wp_register/enqueue_script, but I still got nothing :S
Here's the code:
<style>
#drop {
display: none;
}
</style>
<script>
$(document).ready( function(){
$('#trigger').click( function(event){
event.stopPropagation();
$('#drop').toggle();
});
$(document).click( function(){
$('#drop').hide();
});
});
</script>
<div class="wrapper">
<a id="trigger" href="#">Click Me</a>
<div id="drop">Content</div>
</div>
Any ideas? Thanks in advance :)