1
The excerpt below is similar to what I have on the website homepage:
<div class="text-center">
<div id="minhaClass">
<a href="<?php echo get_site_url(); ?>/texto-1/">texto 1</a>
<a href="<?php echo get_site_url(); ?>/texto-2/">texto 2</a>
<a href="<?php echo get_site_url(); ?>/texto-3/">texto 3</a>
</div>
</div>
In this code has php and html, my doubt is about which functions of jquery I can study to make it possible to print this excerpt in the code depending on the size of the device (desktop, mobile, etc) used?
I know it is possible to use @media queries as a reference when loading, but as I capture this with jquery, what functions make this possible
What do you mean "print this excerpt in the code"? Do you want this div to exist only in the source code of the page on a certain type of device? There is no Javascript in the world that does this.
– Pablo Almeida
I appreciate the response, but I think it’s possible, about printing I think you can use the
.append()
, after a conditional checking the size of the device used– Gislef
The question is how do I capture the size of the device, when loading the page, by DOM
– Gislef