last day (14 days later) » 

11:42 AM
0
A: <head> JS scripts are not executing

Juan MendesWhen you navigate to the next page, you are unloading all the JavaScript/CSS and loading only a piece of HTML. jQuery has a load method that will insert HTML from an external file. $('#loginAction').click(function(){ $( document.body ).load( "ajax/test.html" ); }); To do it for all intern...

 
@Downvoter, please explain what the problem with the answer is
 
jQM loads first page div of any external page, and neglects everything outside that div. Scritps and styles sheets should either be placed in first page's heade or inside page div of any external page. stackoverflow.com/a/21625844/1771795 You may also ask @upvoter why your answer is upvoted :)
 
@Omar Are you saying that JQM already does something like what my snippet is doing?
 
No, it loads page div node and its' contents without the need to add any extra JS functions to load custom libraries. jQM uses AJAX to load external pages. And this is called Single Page Model.
 
@Omar My script is using AJAX to load links into the body. It's probably not the full functionality, but it does do something like what you are saying JQM does.
 
11:42 AM
It is fix, while this issue doesn't require any fix. It requires understanding the way jQM works, that's it. No extra functions are needed to make it work.
 
@Omar Then the answer to my question Are you saying that JQM already does something like what my snippet is doing? should have been a "yes"
 
With all due respect, the answer is "no". If you want to argue, please go through jQM documentations, if you have any question, feel free to post them so I can happily answer them.
 
I think you misunderstood what I'm saying
I wasn't aware of what JQM gave you
and I posted a simple snippet that loads external files using AJAX
and you made me aware that JQM already did that
so, how is the answer to my question no?
 
But this is not the answer. The answer is understanding how jQM works
 
Of course it's not
I didn't say my answer was right
I was asking you if JQM already did something like what my script does
read the comment carefully
--- >>>>> @Omar Are you saying that JQM already does something like what my snippet is doing?
 
11:46 AM
jQM has it's own methods in loading external pages via Ajax
 
That implies I understand that my own code is duplicating JQM functionality
Now I know
I didn't know when I posted the question
my snippet loads external content with AJAX and so does JQM (in a probably more robust fashion)
That's all my question was asking you to confirm
 
Forget it, you are not understanding what I'm saying
 
I understand you
I'm just asking you to go through jQM documentions
 
I don't need to
I already asked if JQM provided that functionality
 
11:51 AM
jQM loads external pages via Ajax, it enhance them, update history, etc
 
and you said yes
 
it's not only about LOADING external page into DOM
 
but for some reason you said no
I know
that's why I said it's a more robust version of my snippet
 
loading an external page passes through different stages
and yes, jQM loads pages as you said, but in a different way
which makes your answer invalid
 
The question in the comment was not asking "is my answer correct"
 
11:52 AM
if you want to understand how jQM works, I'll be glad to provide with all needed info
 
no thanks
 
if you're upset because of the -1, i'll take it
 
I'm not upset with the -1
 
there you go.
 
I really just want to know why you answered no to my question
when my question was not "is my answer correct"
 
11:54 AM
Juan, as I said
 
if you downvoted my because I didn't realize JQM already did what I suggested plus more, that's fine
I understand that
 
.load() is just a small part of the whole solution
 
yes
I said that JQM probably does a lot more than my script
 
have you check the code I sent you on github?
it's from jQM not from me
 
let's leave it at that, now I know what you mean
 
11:55 AM
ok, so we agree that your answer is incomplete, right?
 
Yes we do agree that my answer is not the correct answer
 
when a page is loaded via Ajax, jQM adds binding to it, such as removing it from DOM once hidden
 
thanks for taking the time here
 
.load() will neglect all jQM page processing
 
11:56 AM
you're welcome.
 
later
 
12:22 PM
@JuanMendes you shouldnt have deleted your answer
it turned out that neither of us is correct, he's using worklight framework which works in a mysterious way.
 

last day (14 days later) »