на самом деле у меня две ошибки, и я понятия не имею, откуда взялась первая. Я включил jQuery v.2.1.3 из "code.jquery.com", и Chrome показывает мне эту ошибку.
Uncaught TypeError: Не удается прочитать свойство 'innerText' неопределенного
Вторая ошибка, я думаю, от меня самого.
<head>
<script src="http://code.jquery.com/jquery-2.1.3.min.js"></script>
</head>
<body>
<div class="mydiv" style="height:500px; width:500px; margin:50px auto; background-color:#ddd;">
</div>
<script type="text/javascript">
(function($) {
$.scrollbar = function(options){
var opts = $.extend($.scrollbar.defaults, options);
};
$.scrollbar.defaults = {
background: "yellow"
};
})(jQuery);
$(function(){
$('.mydiv').scrollbar();
//Error: Uncaught TypeError: undefined is not a function
});
</script>
</body>
Может ли кто-нибудь помочь мне? Я в конце своих навыков Google и скоро сдамся.
fn
в$.fn.scrollbar
? 20.02.2015