Re: [jQuery] insertAfter('.address')

2010-01-26 Thread Nathan Klatt
On Tue, Jan 26, 2010 at 9:27 AM, Nathan Klatt  wrote:
> newDiv = createElement("div");
> newDiv.load("http://mydomain.dev/search/view/Id/"; + $(this).attr("id")
> + ".html");
> newDiv.insertAfter(".address");

Whoops, be sure to turn newDiv into a jQuery object after creating it.


Re: [jQuery] insertAfter('.address')

2010-01-26 Thread Nathan Klatt
On Tue, Jan 26, 2010 at 8:38 AM, Bas  wrote:
> $(this).next().insertAfter('.address').load('http://mydomain.dev/
> search/view/Id/' + $(this).attr('id') + '.html');

You're trying to insert $(this).next() after $(".address"). What you
want to do - I'm guessing - is create a new div loaded with the result
of the load call, yes? You need to load the new content into a fresh
div, then insert that after $(".address").

newDiv = createElement("div");
newDiv.load("http://mydomain.dev/search/view/Id/"; + $(this).attr("id")
+ ".html");
newDiv.insertAfter(".address");

Something like that, I think. :)

Nathan


[jQuery] insertAfter('.address')

2010-01-26 Thread Bas
i'm using the following code to load some html after the fieldset:

$(this).next().insertAfter('.address').load('http://mydomain.dev/
search/view/Id/' + $(this).attr('id') + '.html');

but i'll get the error: Node cannot be inserted at the specified point
in the hierarchy" code: "3
[Break on this error] this.parentNode.insertBefore( elem,
this.nextSibling );

so how can i insert something after the class='address' and before the
span tag?

Joepie



Meerweg 4
1921BR Akersloot
0251-317509


Tags: straatgolf