javascript - 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>
解决方案
推荐阅读
- javascript - 在 EJS 模板中获取表单参数
- c# - 如何将模式过滤器添加到一个 Swashbuckle api 文档版本
- javascript - 将数字拆分为数组的方法
- docker - Anchore CLI 卡在“not_analyzing”和其他问题上
- java - 如何始终为 ResponseEntity 返回 JSON 对象(不是数组)
>? - c++ - 将 aws-iot-device-sdk-cpp-v2 与 CMake 一起使用
- powershell - 使用 powershell 使用 sn.exe 导入 pfx 文件
- idris - 如何让 Idris 警告不完整的案例/匹配?
- javascript - 删除父级时,猫鼬删除子文档引用
- c# - 无法与 MySql、.Net Core Api 连接