//= require jquery //= require jquery_ujs //= require bootstrap //= require wice_grid //= require bootstrap-datetimepicker.min function toggleSubMenu() { $('.child').hide(); $('.parent').children().click(function() { if ($(this).hasClass('toggle')) { $(this).removeClass('toggle'); } else { $(this).addClass('toggle'); } $(this).children('.child').slideToggle('slow'); }).children('.child').click(function (event) { event.stopPropagation(); }); } $(document).ready(function() { $("a[rel=popover]").popover(); $(".tooltip").tooltip(); $("a[rel=tooltip]").tooltip(); $('.dropdown-toggle').dropdown(); $('.datetimepicker').datetimepicker({ format: 'yyyy-MM-dd hh:mm:ss' }); toggleSubMenu(); });