$('a[title]').on(...)
only gets called when within the site's root. You can see what I mean here:
www.cheloufi.com/enoi_v2
When you click on the navigation at the top of the page, the div flashes in and content is loaded via AJAX (and the URL changes from (www.cheloufi.com/enoi_v2 to www.cheloufi.com/enoi_v2/#/enoi_v2/currentpage), and when you close it (via the + button) and try to reopen (via one of the links again), the selector doesn't get called.
This is where the navigation links get created:
<a title="unternehmen" href="http://cheloufi.com/enoi_v2/">Unternehmen</a>
<a title="leistungen" href="http://cheloufi.com/enoi_v2/leistungen/">Leistungen</a>
<a title="information" href="http://cheloufi.com/enoi_v2/information/">Information</a>
Also note that even though the href attribute is "http://cheloufi.com/enoi_v2/", when you click on the link, the site redirects to "http://cheloufi.com/enoi_v2/#/enoi_v2/".
Then for the div to roll out:
$('a[title]').on('click', function() {
if(contentState==0){ //check content state
contentOpen(); //open content
$('#toggleBut').css({backgroundPosition:'0px -40px'});
contentState = 1; //indicate content is open
}else{
contentClose();
$('#toggleBut').css({backgroundPosition:'0px 0px'});
contentState = 0;
}
});
However, that method only gets called the first time you click on the link, not on any consecutive times.
Also, this is a modified WordPress theme, if that makes any difference.
Has anyone run into a problem like this before?