html - Remove javascript link in mobile screen -


i have clickable javascript link (trustwave) on desktop website theme i'm trying disable on mobile screens:

in footer.tpl:

<div style="position:absolute; margin-left:100px; margin-top:50px">   <script type="text/javascript" src="https://sealserver.trustwave.com/seal.js?style=invert"></script> 

i know how remove clickable image link on mobile screens (remove image link in mobile screen) example:

in footer.tpl:

<div class="column"> <a href="http://mywebsite.com/delivery" id="test" class="hide"></a>  

in stylesheet.tpl:

@media , (max-width: 480px) {     .hide {       display: none;     } }  #test {   display: block;   background-image: url('../image/myimage.png');   background-repeat: no-repeat;   position: absolute;   margin-top: 10px;   margin-left: 20px;    width: 75px;   height: 75px; } 

but i've no idea how re-create javascript link not display on mobile screens. in advance!

you can use media queries putting media query on end max-width getting confused of context `

here easier way.

 @media , (max-width: 1500px) {         .hide {            display: block;           }}      @media , (max-width: 480px) {         .hide {               display: none;            }} 

or

you can use window.innerwidth() detect width of viewport , store in variable x , use

var m = document.getelementbyid("column") if (x>800) {m.style.display='block'} else m.style.display="none" 

Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -