marko krstić

Collections

Archives

On load and resize

jQuery(document).ready(function($){

// Bind to the resize event of the window object
$(window).on("resize", function () {
    
    var container   = $( `#div_block-21-2` ).width();
    var docWidth    = $( window ).width();
    var final       = docWidth - ((docWidth - container) / 2);

    $('#hero-lines').css('width', final + 'px');

// Invoke the resize event immediately
}).resize();

		
});

Let's Connect

Feel free to reach out for collaborations or just a friendly hello ?
[email protected]
linkedininstagramdribbblefacebook-official