I have a script, as is shown in the following example:
<script type="text/javascript">
var _myplug = _myplug || {};
_myplug.key = '12e9u349u43098j8r940rjciocjo';
_myplug.renderTo = '';
window.myplug||(function(d) {
var s,c,o=myplug=function(){ o._.push(arguments)};o._=[];
s=d.getElementsByTagName('script')[0];c=d.createElement('script');
c.type='text/javascript';c.charset='utf-8';c.async=true;
c.src='js/loader.js?';s.parentNode.insertBefore(c,s);
})(document);
</script>
I know exactly what change I have to do, but I have no idea how to accomplish this in coding language.
What I need to do is:
- When the URL hash changes to "triggerURL" then
_myplug.renderTo = 'happy'; - When URL hash changes again to anything else than "triggerURL" then
_myplug.renderTo = ''
This because the URL can change anytime (without leaving the page) and every time the above hash changes happen, the other described changes need to be done some way.
Anyone with a solution..... Thanks a LOT!