F
F
FreeZa2015-05-03 16:36:13
JavaScript
FreeZa, 2015-05-03 16:36:13

How to solve the problem with .load() and $(function(){}); on android?

Good day, comrades. A couple of days ago I noticed a funny glitch or bug, or maybe this is in my crooked hands =)

I have 2 pages. Assume A and B. On page A, I use load() to load content from page B.

Page B has a script. As expected, it starts with

$(function(){
...
});


Actually, here's the catch: everything works fine on the computer, but when I open the page on android, the code block on page B does not work. I also tried
$( document ).ready()

Where can these problems come from and what solutions can there be?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dima Pautov, 2015-05-03
@bootd

You upload a piece of html code, but the scripts on page B did not work at that moment and will not work until you go to it yourself. When you load the content from page B into A, that's when you apply the script from page B.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question