Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

window width onload jquery

function resizeLogic() {
    if ($(window).width() < 620) {
        $("#prd_details_smaller").append('.product_title, .product_code, .prd_reviews');
        $("#short_desc").hide();
    } else {
        $(".col_prd_rgt").prepend('.product_title, .product_cod, .prd_reviews');
        $("#short_desc").show();
    };
}
resizeLogic(); // on load
$(window).resize(resizeLogic); // on window resize
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #window #width #onload #jquery
ADD COMMENT
Topic
Name
4+6 =