JSFiddle - React, Tailwind, and code Playground
by Jaak Kütt
HTML
<div class='article_document'>
<img src='uploads/code0.png' class='article_image'>
<span class='article_title'>example</span>
<span class='article_author'>example</span>
<span class='article_idn'>example</span>
</div>
CSS
.article_document{
background: yellow;
}
JavaScript
$('.article_document').click(function () {
var pg_width = $(window).width();
var element_width = (pg_width - 20) / 2;
var element_height = element_width / 2;
$(".article_document").css({"background-color":"red", "width":""+element_width+"px", "height":""+element_height+"px"});
});