Bug Tracker

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#8440 closed enhancement (wontfix)

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

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


It would be convenient to append things from other pages.

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

Change History (3)

comment:1 Changed 5 years ago by paul.irish

  • Resolution set to wontfix
  • Status changed from new to closed

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.

comment:2 Changed 5 years ago by ajpiano

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.

comment:3 Changed 5 years ago by trusktr

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.

Last edited 5 years ago by trusktr (previous) (diff)
Note: See TracTickets for help on using tickets.