Jquery .html and .load

Posted by Jack Pilowsky on Stack Overflow See other posts from Stack Overflow or by Jack Pilowsky
Published on 2012-12-17T22:59:18Z Indexed on 2012/12/17 23:03 UTC
Read the original article Hit count: 235

Filed under:
|
|

I'm trying to teach myself jQuery and I'm a little stomped with the load() method. I'm working on eBay listings. Yes, I know includes are not allowed on ebay. However, there is a workaround that has been around for a few years and ebay doesn't seem to be cracking down on it.

var ebayItemID='xxxxxxxxxxxxxx'; // This is eBay code. I cannot edit it. 

<h1 id="title"> TO BE REPLACED</h1>

$(document).ready(function(){
var link = "http://www.ebay.com/itm/" + ebayItemID + "?item=" + ebayItemID +   &viewitem=&vxp=mtr";
var newTitle = $('#title').load(link + "#itemTitle");
$('#title').html(newTitle);
});

What's the point of this. I want to show the item title on the description, but I want to do so dynamically,

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery