This is my code
var bodyWidth = ($(document).width()/2);
console.log(bodyWidth);
$('.freeshipping').css('right',bodyWidth);
Its is fine , but i want work this function body resize and page refreshing . How?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
and if you need to execute also once (without explicit resize action) chain the
trigger()methodsince you’re targeting a DOM element
$('.freeshipping'), be sure to wrap this snippet at domready event