Endi.
Endi.

Reputation: 1

JavaScripts not working in mac OS, iphone

I wrote js code for wordpress website, and unfortunetly it is not working in safari and every browser in mac system. I don't know why. My scripts should react for 'click' event and charge input value. In windows evrything is ok, but in safari, mac, iphone not. I'm not sure where is a error, in safari console i can't see any mistake. My code is a little long, so if you want help me, i can send you link for my website.

<button id="checkBank" class="checkNumberButton" type="submit"><span>Sprawdź</span></button> 

document.querySelector("#checkBank").addEventListener("click", function () {my code here}

Where i can find information about difference between apple system and windows?

Upvotes: 0

Views: 358

Answers (1)

eds1999
eds1999

Reputation: 1058

You forgot to close addEventListener. This should work (works on my Mac)

document.querySelector("#checkBank").addEventListener("click", function () {alert("test")});

https://jsfiddle.net/hpeyr870/

Upvotes: 2

Related Questions