简体   繁体   中英

jQuery .not(element) doesn't work in mobile browser (Firefox, Chorme, Safari)

I would like customize input elements except input element with id #search , so i used not('#search') , but this doesn't work in mobile browser (safari with iphone 9.2 and with app Firefox and Chrome). In desktop browser works very well. What i tried:

    $('input').not('#search').css({ 
        'max-width': '90%',
        'border-radius': '8px',
        'color': '#000'
    }); 

https://jsfiddle.net/jfxpehrL/2/

So in mobile browser not() doesn't work and input #search is customized

How is possible ?

I have other way to do what i want to do ?

Thanks a lot and sorry for my english :)

You can also try :not() selector:

$('input:not(#search)').css({ 
    'max-width': '90%',
    'border-radius': '8px',
    'color': '#000'
}); 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM