I got this issue, In the above html I cannot click on the dropdown menu, I went wrong some where ,my dropdown menu in this code is not working can any one please let me know where i went wrong?
CSS:
Javascript:
<script type="text/javascript">
$(function() {
$('.menucontainer').hide();
$('#container').sortable({
handle:'h1',
scroll: false,
revert: true,
tolerance: 'pointer'
});
$('.dropmenu').on('click', function(){
var $ul = $('.menucontainer', this);
$ul.show(500);
console.log( $ul );
return false;
});
$('html').on('click', function() {
$('.menucontainer').hide(500);
});
});
</script>
You had a number of issues in your code. I think I’ve fixed them all here: http://jsfiddle.net/exuY9/
A couple of things:
head, in which case, the elements wouldn’t be present to attach handlers, to. If your script was attached at the end of thebodythen this would be less of a concern;