How to retrieve content via .load() or $.get() with this line
Posted
by
Sin
on Stack Overflow
See other posts from Stack Overflow
or by Sin
Published on 2010-12-22T03:44:38Z
Indexed on
2010/12/22
3:54 UTC
Read the original article
Hit count: 191
hello :) I posted a question a day or two ago about how to retrieve php via ajax method in this modal I was using. I kinda found out the right way to go about it, but there's still something I'm not doing right (obviously lol) Here's the section thats giving me the issues:
jQuery('div that holds content').fadeIn(200).css({ 'width': Number( popWidth ) });
$('').load('/something/somewhere/this #content');
So, im using safari, and a local server (mamp), when I check activity in my browser, it shows that it is loading the content with every click, AND the pop up pops up, but no content. When I simply retrieve content via hidden div, ofcourse, i get it. This is what I'm trying to avoid. right now I have that div in my footer stashed as hidden. I'd rather just make a call when its needed, instead of loading it every single time a page is accessed.
you can go here to see the whole script i posted in my last question: How to use ajax to show php in a modal pop up
Anyone have any idea? I read that .load()
has the ability to grab specific content from a request, but im not sure the major difference between that and $.get()
I've tried both, and I get the same results. Im using wordpress, and wordpress's ajax requests run smooth as ever, so I know its not a local problem, i'ts my coding lol
Ok....Im done typing :)
© Stack Overflow or respective owner