Javascript-форум (https://javascript.ru/forum/)
-   jQuery (https://javascript.ru/forum/jquery/)
-   -   Не работают скрипты (https://javascript.ru/forum/jquery/58614-ne-rabotayut-skripty.html)

TanyaRom 01.10.2015 10:40

Не работают скрипты
 
Вложений: 1
Сайт на Joomla
Скриншот ошибок в консоле во вложеных сайтах
Все скрипты файла js.js
$(document).ready(function(){
    $("#anchor").on("click","a", function (event) {
        event.preventDefault();
        var id  = $(this).attr('href'),
            top = $(id).offset().top;
        $('body,html').animate({scrollTop: top}, 1500);
    });
});


function DropDown(el) {
		this.dd = el;
		this.placeholder = this.dd.children('span');
		this.opts = this.dd.find('ul.dropdown > li');
		this.val = '';
		this.index = -1;
		this.initEvents();
		}
		DropDown.prototype = {
			initEvents : function() {
			var obj = this;

			obj.dd.on('click', function(event){
			$(this).toggleClass('active');
			return false;
			});

				obj.opts.on('click',function(){
				var opt = $(this);
				obj.val = opt.text();
				obj.index = opt.index();
				obj.placeholder.text(obj.val);
					});
				},
				getValue : function() {
					return this.val;
				},
				getIndex : function() {
					return this.index;
				}
			}

			$(function() {

				var dd = new DropDown( $('#dd') );

				$(document).click(function() {
					// all dropdowns
					$('.wrapper-dropdown-3').removeClass('active');
				});

			});


Часовой пояс GMT +3, время: 10:27.