views:

74

answers:

1

lets say i use jquery.get to retrive a website to string and how am i gonna select the whole table with class=product from it? $() seem cant work on string ....

+1  A: 

You can use .load() for this, like this:

$("#elementToLoadIn").load("myPage.htm .product");

The format is "url selector" (note the space there).

The $.get alternative is:

$.get("myPage.htm", function(data) {
   $("#elementToLoadIn").html($(".product", data));
});
Nick Craver