Ok, I realized that β#slidesβ is not the right element that I need to get the width value, since it was also part of the slide frame, instead I get the size of the event browser screen, where I have to pass the value every time Resize your browser screen.
Please view this link to see the updated script. updated script source
Here is the code that I found useful to fix my problem.
$(window).resize(function() { var sp = $('#slides .slide'); console.log(document.body.clientWidth); winWidth = document.body.clientWidth; sp.css('width', winWidth); });
In this case, I can completely resize my width and automatically adjust the width of an element of my class without having the center object in one place. :)
source share