Search code examples
javascripthtmlcssjquery-mobilesamsung-mobile

Link is not clicked in mobile


I have built a Suggest button for my players, which you can view live here. It works in the iPhone of my best friend and since I do not haven a modern cellphone, it works o my broswer's device mode, which however does not list that specific device that seems to have the problem. Users using android report that it works there too!

I am using jQuery mobile and the problem is produced in Samsung galaxy s3 neo, when using Chrome browser.

The HTML is:

<a id="search_btn" data-role="button" class="ui-btn ui-corner-all ui-shadow ui-btn-inline ui-icon-search ui-btn-icon-left">Show me the players</a>

and the JS:

$(window).load(function() {
    ...
    $("#search_btn").click(function(){
        alert("marievi leeeme!"); // that user can not even see this!
        var slot = 0;
        ...

Any ideas? I do not have a clue. Maybe it's because I am using an a tag instead of a real button?


Solution

  • Try:

    $(document).ready(function(){
         var self = this;
         $("#search_btn").click(function(){
            self.alert("marievi leeeme!"); // that user can not even see this!
            var slot = 0;
         });
    });