How to implement ads JS files for different screen sizes?
-
Hi,
Sorry for any inconvenience in advance!
I can’t make sure this question whether it can be solved from you. Or it is out of range from you can handle.
I am still investigating this issue now. So far, I can’t find out any clue as this subject. So, could you please helpt to give any advice if available?
I tried to add below codes into [Text Widget] to reach this request. But it seems can’t work properly.<script type="text/javascript"> function big_size() { var element = document.createElement("script"); element.src = "/big_size.js"; document.body.appendChild(element); } function small_size() { var element = document.createElement("script"); element.src = "/small_size.js"; document.body.appendChild(element); } if(screen.width < 768) { window.onload = small_size; } else { window.onload = big_size; } </script>
Thanks for a million!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How to implement ads JS files for different screen sizes?’ is closed to new replies.