Is it possible to close a Content Area Off-Canvas by click on a filter for a portfolio? Can’t work out how to do it.
Basically I have a number of categories which the visitor can click in the off-canvas screen. When they click one of the filters it changes what is displayed on the page, but I would like to upon the click of the filter to close down the off-canvas box.
A previous post (now closed as I only saw the reply recently) gave this as a solution:
jQuery ( function($) {
$(’#custom-close’).click(function(){
$(’#my-off-canvas-off-canvas button’).click();});
} );
This is fine with a text link or button but I can’t seem to work out how to add an ID to the portfolio filter shortcode to get it to work.
Any help would be appreciated.