Reputation: 21
I have a script that need to work only in mobile view in my blog in blogger (blogspot). How can I do it?
This is the script:
<!-- Beginning PassBack for Ad unit KartisimOnline_Android_MobileWeb_Transition_IP ### size: [[1,1]] -->
<script type='text/javascript' src='http://www.googletagservices.com/tag/js/gpt.js'>
googletag.pubads().definePassback('7047/KartisimOnline_Android_MobileWeb_Transition_IP', [[1,1]]).display();
</script>
the template is responsive.
Tx for anyone that can help....
Upvotes: 1
Views: 1024
Reputation: 281
You can also use this one:
<b:if cond='data:blog.isMobile == "true"'>
....Your script here....
</b:if>
Upvotes: 0
Reputation: 186
You only need to put your script inside this conditional.
<b:if cond='data:blog.isMobileRequest'>
...
</b:if>
Upvotes: 1