Search code examples
javascriptcssiphonesafari

Javascript not working in IPhone


I have write code to change color at run time using Javascript. It work well on Desktop and Andriod Mobile Phones but It is not working on IPhone 5 and 6, I have also tested with Safari in Desktop it works fine on Desktop Safari but not works in Iphone Safari.

Thanks


Solution

  • You get Scripterrors when clicking the buttons: Uncaught TypeError: undefined is not a function (index):181

    document.getElementById("logoimg")
    

    does not return an element as there is none with this id.

    If you fix this it may will work :)