Skip to main content

Bug Tracker

Side navigation

#8440 closed enhancement (wontfix)

Opened March 04, 2011 03:44AM UTC

Closed March 07, 2011 05:33PM UTC

Last modified March 09, 2011 12:00PM UTC

SUGGESTION: Make .append() able to take a URL in the same manner as .load()

Reported by: jp@bettafootwear.com Owned by:
Priority: undecided Milestone: 1.next
Component: unfiled Version: 1.5.1
Keywords: Cc:
Blocked by: Blocking:
Description

It would be convenient to append things from other pages.

ex: $('#box').append('http://somewhere.com #someDiv');

Attachments (0)
Change History (3)

Changed March 07, 2011 05:33PM UTC by paul.irish comment:1

resolution: → wontfix
status: newclosed

cool idea.

so instead of

$('#box').append(' http://somewhere.com #someDiv');

you can just do

$('<div></div>').appendTo('#box').load('http://somewhere.com #someDiv');

which just requires a touch more work but really its not too bad.

Changed March 07, 2011 05:35PM UTC by ajpiano comment:2

FYI: part of why we wontfix'd this is because it would be very complicated and perhaps not-woth-it to determine what is a URL string with an optional selector and what is just an html string someone wants to append.

Changed March 09, 2011 12:00PM UTC by trusktr comment:3

_comment0: oh, ok, cool. I didn't know .appendTo(). \ \ So does .appendTo() ignore the matched item in $('<div></div>') and append to #box in your example?1299672116028804

oh, ok, cool. I didn't know .appendTo().

So does .appendTo() ignore the matched item in $('<div></div>') and append to #box in your example?

EDIT: wait, nevermind, i get it! Nice.