I want to be able to display a div containing some content to be URL specific. So only show div on pages that contain specified URL, for example:
if URL is equal to any one of the following:
/makeup/face/foundation/compact-loose-powder/luminous-silk-compact-case/3614270283604.html
/makeup/face/foundation/liquid-foundation/designer-lift-foundation/3605521491268.html
/makeup/face/foundation/liquid-foundation/power-fabric-foundation/ww-00049-arm.html
/makeup/face/foundation/liquid-foundation/maestro-fusion-makeup/AP10123.html
/makeup/face/foundation/face-fabric/ww-00115-arm.html
Show the following div:
<div class="container-content">content</div>
else hide it.
I ave tried the following with no success:
var paths = ['/makeup/face/foundation/compact-loose-powder/luminous-silk-
compact-case/3614270283604.html', '/makeup/face/foundation/compact-loose-
powder/luminous-silk-compact-case/3614270283604.html', '/makeup/face/foundation/liquid-foundation/power-fabric-foundation/ww-00049-arm.html', '/makeup/face/foundation/liquid-foundation/maestro-fusion-makeup/AP10123.html', '/makeup/face/foundation/face-fabric/ww-00115-arm.html'];
$('.container-content').toggle(paths.indexOf(location.path) != -1);