Показать сообщение отдельно
  #22 (permalink)  
Старый 04.09.2014, 15:50
Аватар для vmazal
Аспирант
Отправить личное сообщение для vmazal Посмотреть профиль Найти все сообщения от vmazal
 
Регистрация: 04.09.2014
Сообщений: 48

// Enable menu toggle for small screens.
	( function() {
		var nav = $( '#primary-navigation' ), button, menu;
		if ( ! nav ) {
			return;
		}

		button = nav.find( '.menu-toggle' );
		if ( ! button ) {
			return;
		}

		// Hide button if menu is missing or empty.
		menu = nav.find( '.nav-menu' );
		if ( ! menu || ! menu.children().length ) {
			button.hide();
			return;
		}

		$( '.menu-toggle' ).on( 'click.twentyfourteen', function() {
			nav.toggleClass( 'toggled-on' );
		} );
	} )();


На 20,21 строчке ошибки, Undefined is not a function говорит
Находится ошибка в файле functions.js от стандартной темы Wordpress


"undefined" != typeof jQuery ? ("undefined" == typeof jQuery.fn.hoverIntent && !function(a) {
    a.fn.hoverIntent = function(b, c, d) {
        var e = {interval: 100,sensitivity: 7,timeout: 0};
        e = "object" == typeof b ? a.extend(e, b) : a.isFunction(c) ? a.extend(e, {over: b,out: c,selector: d}) : a.extend(e, {over: b,out: b,selector: c});
        var f, g, h, i, j = function(a) {
            f = a.pageX, g = a.pageY
        }, k = function(b, c) {
            return c.hoverIntent_t = clearTimeout(c.hoverIntent_t), Math.abs(h - f) + Math.abs(i - g) < e.sensitivity ? (a(c).off("mousemove.hoverIntent", j), c.hoverIntent_s = 1, e.over.apply(c, [b])) : (h = f, i = g, c.hoverIntent_t = setTimeout(function() {
                k(b, c)
            }, e.interval), void 0)
        }, l = function(a, b) {
            return b.hoverIntent_t = clearTimeout(b.hoverIntent_t), b.hoverIntent_s = 0, e.out.apply(b, [a])
        }, m = function(b) {
            var c = jQuery.extend({}, b), d = this;
            d.hoverIntent_t && (d.hoverIntent_t = clearTimeout(d.hoverIntent_t)), "mouseenter" == b.type ? (h = c.pageX, i = c.pageY, a(d).on("mousemove.hoverIntent", j), 1 != d.hoverIntent_s && (d.hoverIntent_t = setTimeout(function() {
                k(c, d)
            }, e.interval))) : (a(d).off("mousemove.hoverIntent", j), 1 == d.hoverIntent_s && (d.hoverIntent_t = setTimeout(function() {
                l(c, d)
            }, e.timeout)))
        };
        return this.on({"mouseenter.hoverIntent": m,"mouseleave.hoverIntent": m}, e.selector)
    }


на первой строчке ошибка, тоже undefined is not a fucntion
находится в файле admin-bar.min.js

Последний раз редактировалось vmazal, 04.09.2014 в 15:52.
Ответить с цитированием