Nanoscroller显示无法读取未定义的属性“样式",为什么? [英] Nanoscroller showing Cannot read property 'style' of undefined why?

查看:154
本文介绍了Nanoscroller显示无法读取未定义的属性“样式",为什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的代码

<ul id="selectProfileOptions_IC" class="dropdownToggle_cont" ></ul>

我在ul元素下列出了一些名称

I listed some names under the ul element

我使用了nanascroller进行滚动,这是我的代码

i used nanascroller for scroll here is my code

$(".dropdownToggle_cont.nano").nanoScroller({stop: true});
    $(".dropdownToggle_cont").css('height',$(".dropdownToggle").height()).addClass('nano');
    $(".dropdownToggle_cont.nano").nanoScroller();  

显示错误Uncaught TypeError:无法读取未定义的属性'style'

it showing error Uncaught TypeError: Cannot read property 'style' of undefined

我还添加了我的nano.css文件.

i am also added my nano.css file .

推荐答案

如果已经生成滚动,则会发生此错误

This error will occur if already a scroll generated

这篇关于Nanoscroller显示无法读取未定义的属性“样式",为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆