I’d like to apply a query UI effect to an element depending on the # from the URL.
i.e.: When loading http://www.mysite.com/page.html#name, effect() is applied to the element with the #name id while loading http://www.mysite.com/page.html#othername would have effect() apllied to the element with the #othername id and http://www.mysite.com/page03.html would simply have no effect() applied.
You can use
window.location.hashto get the part of the URL that follows the # symbol, including the # symbol.See window.location
In your case it will return
#name.