lighter77
lighter77

Reputation: 21

show script in mobile only in blogger blog

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

Answers (2)

Fahim Raza
Fahim Raza

Reputation: 281

You can also use this one:

<b:if cond='data:blog.isMobile == &quot;true&quot;'>

....Your script here....

</b:if>

Upvotes: 0

1e90ff
1e90ff

Reputation: 186

You only need to put your script inside this conditional.

<b:if cond='data:blog.isMobileRequest'>
    ...
</b:if>

Upvotes: 1

Related Questions