I am having a weird problem with iOS and a sliding menu (which can be found at Weird iOS animation, display with jQuery? )
I believe there is a conflict with my scruffy code, and another plugin (as on another version of the site, the sliding menus work with the plugin, but I cannot use that code).
$('#menu-item-134 a').click(function(e) {
e.preventDefault();
var elm = $('.open'+$(e.target).parent().attr('id').replace('link', ''));
$('.subnav').not(elm).filter(':visible').animate({width: 'toggle'}, 1000);
elm.animate({width: 'toggle'}, 1000);
});
$('#menu-item-135 a').click(function(e) {
e.preventDefault();
var elm = $('.open'+$(e.target).parent().attr('id').replace('link', ''));
$('.subnav').not(elm).filter(':visible').animate({width: 'toggle'}, 1000);
elm.animate({width: 'toggle'}, 1000);
});
A shortened version of the script can be found on this JSfiddle
Basically what would be the best way to write that script?
You could select both links at once : http://jsfiddle.net/pxd8z/3/