Why does not inserting elements into the DOM on the IPhone?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
19 views
There is a JS function, which works correctly on all devices except on IOS. A particular challenge to create a mobile device like the IPhone. The project has a number of similar features, but they all die at the stage of embedding new content into the DOM (on IOS). Request to the server and the response is working correctly. Data is transmitted and they can even display an alert, but as soon as it comes to .html() all falling. The no IOS devices, so specific to describe the situation is not possible.

Tell me, what's wrong here? In which direction to move?
loadbag function(){ $.ajax({ type: "POST", url: "functions/loadbag.php", dataType: "html", cache: false, success: function(data){ data = JSON.parse(data); if($(window).width() > 770){ $("#bag-point").html(' ' + data["main"]); } else if(data["alt"] != null){ $("#bag-point").html(' ' + data["alt"]); } else if(data["alt"] == null){ $("#bag-point").empty(); } } }); }
by | 19 views

1 Answer

0 like 0 dislike
Problem solved, it was the work of caching scripts on IOS
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
110,608 questions
257,187 answers
0 comments
40,796 users