I am using AnythingSlider jQuery plugin which dynamically reads the hash in the URL and selects an item on a page via jQuery. The problem is the end user can break the plugin if they get to http://mydomain.com/#!demos/slider.
Is there a way to test if a selector is valid instead of letting jQuery crashing (built in function or regex)? See this jsFiddle example that tries to do $('#!demos/slider') and it crashes: http://jsfiddle.net/PvY2b/
$('#!demos/slider') <= Uncaught Error: Syntax error, unrecognized expression: #!demo/slider