首页 > 解决方案 > How can changed after or befor in css style in jquery or javascript

问题描述

I have one class name that html and html have after this have low width I want my page scroll after changed width:100%, but this don't take it css. How can target after in jquery for css.

$(document).scroll(function(){
    _scroll = $(this).scrollTop()
    $('.demo').text( _scroll)
    if(_scroll>2155){
        $('.html').after().css('width' , '100%')
    }
})
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

标签: javascriptjqueryscrolltop

解决方案


推荐阅读