WordPress.org

Forums

The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Advanced AJAX Page Loader
[resolved] Ignore List by some class or id (4 posts)

  1. Andrew MAGIK
    Member
    Posted 4 years ago #

    Hey.
    Is it possible to ignore list, not through url, but after a certain class or id?

    Why? Let me explain:
    I use a multilingual plugin qTranslate. It generates its own menu to switch languages. Therefore, to change the language of the main menu - you need to refresh the entire page, as the main menu is the same in the header. Otherwise, if you change the language changes only content, and the menu is the one that was in the beginning, when approaching the site.

    http://wordpress.org/extend/plugins/advanced-ajax-page-loader/

  2. Andrew MAGIK
    Member
    Posted 4 years ago #

    Спасибо за быстрый и изчерпывающий ответ )
    Вообщем вот моё решение:

    заменяем 43 строчку кода в

    if (this.href.indexOf(AAPLhome) >= 0 && AAPL_check_ignore(this.href) == true){

    на

    if (this.href.indexOf(AAPLhome) >= 0 && AAPL_check_ignore(this.href) == true && (this.href).parent().attr('class')=='language-menu-container'){

    где language-menu-container - название класса родителя, ссылки в котором будут полностью перегружать страницу, без использования плагина.

  3. wiktoratgmail
    Member
    Posted 4 years ago #

    It's not working :-/

    I've made this change in advanced-ajax-page-loader/ajax-page-loader.js and plugin is no longer working.

  4. Andrew MAGIK
    Member
    Posted 4 years ago #

    Вот что я в итоге использовал в рабочем проекте:
    if (this.href.indexOf(AAPLhome) >= 0 && AAPL_check_ignore(this.href) == true && 1 != jQuery(this).closest('.language-menu-container').length){
    это изменение проверят наличие нужного класса у всех родителей элемента, не только у его непосредственного родителя...

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Advanced AJAX Page Loader
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.