Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function(){
- function wrapperWidth() {
- var wrapper_width = $('body').width();
- if (wrapper_width < 801 || window.innerHeight > window.innerWidth) {
- $('.video-profile').wrap("<div></div>");
- }
- }
- wrapperWidth();
- $(window).resize(function() {
- wrapperWidth();
- });
- });
- <div>
- <div>
- <div>
- <div>
- <div>
- <div>
- <div>
- <div>
- <div class="video-profile"></div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- if (wrapper_width < 801 || window.innerHeight > window.innerWidth) {
- if (!$('.video-profile').parent().hasClass('vp-container')) {
- $('.video-profile').wrap("<div class="vp-container"></div>");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement