0

I want to add the class "ios7-fix" only for Safari on iOS7.

I have coded that:

$(document).ready(function(){
if (navigator.userAgent.match(/(iPad|iPhone|iPod);.*CPU.*OS 7_\d/i)) {
    if (navigator.userAgent.match('Safari')) { $('body').addClass('ios7-fix'); }
}

But: It adding the class "ios7-fix" to chrome on iOS7 too. Why?

Du you have a solution?

Thanks a lot!

ios7waeh
  • 21
  • 1

0 Answers0