HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux ns3133907 6.8.0-86-generic #87-Ubuntu SMP PREEMPT_DYNAMIC Mon Sep 22 18:03:36 UTC 2025 x86_64
User: cssnetorguk (1024)
PHP: 8.2.28
Disabled: NONE
Upload Files
File: //old_home_backup/vinylsingles.co.uk/public_html/wp-content/themes/aadya/js/theme-menu.js
( function( $ ) {
	$('ul.dropdown-menu [data-toggle=dropdown]').on('click', function(event) {
		// Avoid following the href location when clicking
		event.preventDefault(); 
		// Avoid having the menu to close when clicking
		event.stopPropagation(); 
		// If a menu is already open we close it
		//$('ul.dropdown-menu [data-toggle=dropdown]').parent().removeClass('open');
		// opening the one you clicked on
		//$(this).parent().addClass('open');
		$(this).parent().toggleClass('open');

		var menu = $(this).parent().find("ul");
		var menupos = menu.offset();
	  
		if ((menupos.left + menu.width()) + 30 > $(window).width()) {
			var newpos = - menu.width();      
		} else {
			var newpos = $(this).parent().width();
		}
		menu.css({ left:newpos });

	});
} )( jQuery );