The given code loads html content in desktop browsers.
But the same is not working in mobile browser(android - chrome).
$(document).ready(function() {
loadDiv();
});
loadDiv() {
$("#divId").load(url);
}
How can i do this ?
The given code loads html content in desktop browsers.
But the same is not working in mobile browser(android - chrome).
$(document).ready(function() {
loadDiv();
});
loadDiv() {
$("#divId").load(url);
}
How can i do this ?
It is definetly about your url variable.
You cannot load the source from external web sites.It must be under your domain.
So if i were you.I'd add some basic html under my domain.
Let me explain;
Let say you have an index folder.And index.html inside of it.Add example.html to this folder. So far you folder details should like that
index.html --> it has script tags which calls your functions etc..
script.js --> this has your jquery functions
example.html--> add some p tags or anything
And now:
$document.ready(function(){
var url = "example.html";
$("#divId").load(url);
});
If it works then you know its all about your url variable.