E
E
Egor Rublev2015-12-22 19:45:13
JavaScript
Egor Rublev, 2015-12-22 19:45:13

jQuery code not working on iOS, why?

Good evening, I wrote a script that displays data from variables in pop-up windows and the right places on the site, it works on windows and andoid, but does not want to work on iOS, what could be the problem?

jq_144(function($){

$('#block-new157 input.input[name="widget_1"]').css('display', 'none');

var turl = ['..../images/276061/'],
name = Array(49).fill(0).map((v, i) => '.name' + (i + 1)),
price2 = Array(49).fill(0).map((v, i) => '.price' + (i + 1)),
buttons = ['...'],
zagl = ['...'],
text1 = ['...'],
text2 = ['...'],
text3 = ['...'],
text4 = ['...'],
price = ['...'],
purl = ['...']

$(buttons).each(function(index, id) {
    $(id).on('click', function() {
        $('#pzagl').html(zagl[index]);
        $('#ptext1').html(text1[index]);
        $('#ptext2').html(text2[index]);
        $('#ptext3').html(text3[index]);
        $('#ptext4').html(text3[index]);
        $('#price').html(price[index]);
        $('#block-new145 img').attr('src', turl + purl[index] + '.jpg');
        $('#block-new157 input.input[name="widget_1"]').val(zagl[index]);
    });

    $(name[index]).html(zagl[index]);
    $(price2[index]).html(price[index]);
    $(buttons[index]).css('cursor', 'pointer');
});

});

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2015-12-22
@FaloSun

Array(49).fill(0).map((v, i) => '.name' + (i + 1))

Safari does not support arrow functions.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question