Plugin Directory

Changeset 1271677


Ignore:
Timestamp:
10/23/2015 09:54:25 AM (10 years ago)
Author:
markzero
Message:

fix search box js error

Location:
awesome-sticky-header
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • awesome-sticky-header/tags/1.0.2/assets/js/main.js

    r1271666 r1271677  
    233233    var search = $('.middle li.search');
    234234
    235     if ($('li.search input').parent()[0].tagName !== 'FORM') {
    236       $('li.search input').wrap('<form></form>');
     235    if ($('li.search input').length) {
     236        if ($('li.search input').parent().length) {
     237            if ($('li.search input').parent()[0].tagName !== 'FORM') {
     238              $('li.search input').wrap('<form></form>');
     239            }
     240        }
    237241    }
    238242
  • awesome-sticky-header/trunk/assets/js/main.js

    r1198799 r1271677  
    233233    var search = $('.middle li.search');
    234234
    235     if ($('li.search input').parent()[0].tagName !== 'FORM') {
    236       $('li.search input').wrap('<form></form>');
     235    if ($('li.search input').length) {
     236        if ($('li.search input').parent().length) {
     237            if ($('li.search input').parent()[0].tagName !== 'FORM') {
     238              $('li.search input').wrap('<form></form>');
     239            }
     240        }
    237241    }
    238242
Note: See TracChangeset for help on using the changeset viewer.