I'm trying to change some of the page html content according to specific query string using javascript fired by Google Tag Manager.
The issue - that it not stable, it works sometimes and shows the pic and sometimes it doesn't for no reason.
HTML
<style>#dc {display:none;}</style>
<img id="dc" class="alignleft wp-image-2685" src="/someImage.png" width="269" height="400" />
JavaScript
<script type="text/javascript">
$(document).ready(function() {
$('#dc').show();
}
);
</script>
I've tested if the Tag is firing and all, and it fires correctly (when querystring dc=1), here is the trigger:
Anyone has any idea why it's not working stably? how can I fix it?