$(document).ready(function () { $('ul').on('click', 'li', function(event){ $(this).children("ul").slideToggle() ; event.stopPropagation(); }); });