Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Prototype problem in WordPress with ‘getelementbyselector’ in JavaScript tabs

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #33298
    Alexstl82
    Participant

    Hello,

    My JavaScript enabled tabs (control.tabs.2.1.1.js) are only working correctly in Firefox, but not IE, Chrome or Safari. However, in IE compatibility mode they do work.

    My domain is http://www.naturalcosmeticnews.com

    The tabs are all being displayed at once on the homepage and sidebar, vertically, one below the next.

    My site is running both Prototype and jQuery, so potentially there could be a conflict. I belive I have narrowed the problem down to an issue occuring with ‘getelementbyselector’ [http://www.prototypejs.org/api/element/getelementsbyselector] which apparently has been deprecated in favor of the more concise Element#select.

    Here is where I think the problem is located:

    (typeof(this.options.linkSelector == 'string')
    ? $(tab_list_container).getElementsBySelector(this.options.linkSelector)
    : this.options.linkSelector($(tab_list_container))
    ).findAll(function(link){
    return (/^#/).exec(link.href.replace(window.location.href.split('#')[0],''));

    Any solutions on solving the problem are much appreciated.

    Thanks.

Viewing 1 post (of 1 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.