I’m hoping this is quite simple but I’m looking to activate a specific button after I click a certain element on the page.
So far, I’ve looked at the button’s class and added a .click function but unfortunately, this isn’t working.
Any suggestions would be most welcome.
Note*
This button hasn’t got a url contained in the link but activates a slider.
Amended Code
$r(document).ready(function() {
function clickme(){
$r('.coda-nav ul li a.current').click();
};
$r('#open').click(function () {
$r('#expandable-2').show('slow');
clickme();
});
$r('#close').click(function () {
$r('#expandable-2').hide('1000');
clickme();
});
});
Your question is a bit unclear – are you wanting to click on a Div element (for example), and have that click behave as if you have clicked on a button (or similar)? If so, try
Edit: just seen your comment on the other answer. Think this should do: