akia
Well-known member
I think I might have come up with a solution, as to dealing with the problem of having responsive theme.
I'm just going to remove the DfP blocks which I've given them all classes depending on when they should be called.
i've come up with this javascript with I've pieced together from lots of different sources.:
but could someone who knows about these things give it a once over to make sure I'm doing it properly.
I'm just going to remove the DfP blocks which I've given them all classes depending on when they should be called.
i've come up with this javascript with I've pieced together from lots of different sources.:
Code:
<script type="text/javascript">// <![CDATA[
var width = window.innerWidth || document.documentElement.clientWidth;
if (width >= 801) {
$( document ).ready( function() {
$( ".tnadsmobile" ).remove()
});
$( document ).ready( function() {
$( ".tnadstablet" ).remove()
});
}
else if ((width >= 481) && (width <= 800)) {
$( document ).ready( function() {
$( ".tnadsmobile" ).remove();
});
$( document ).ready( function() {
$( ".tnadsdesktop" ).remove();
});
}
else if (width <= 480) {
$( document ).ready( function() {
$( ".tnadsdesktop" ).remove();
});
$( document ).ready( function() {
$( ".tnadstablet" ).remove();
});
}
// ]]></script>
but could someone who knows about these things give it a once over to make sure I'm doing it properly.