I'm working with a client who's stuck using a widget based website and needs a custom built web app. We're hosting it off site. I need to pull product information from their main site to populate the off site page.
I wrote this to pull H1 content from their main site, this will serve as the link to the off site page.
<a href="#" id="specialURL">BUILD LEASE</a>
<script type="text/javascript">
$(document).ready(function() {
var url = $('h1').html();
url = url.replace(/\s+/g, '-').toLowerCase()+'.html';
console.log(url);
$('#specialURL').attr('href', 'http://joethemovie.com/' + url );
});
Now I need to turn the URL content back into an h1 on the off site page.
Also, if possible, does anyone know how I could store price information in the URL?
Such as http://example.com/mainSiteH1&price=12345
Then, same as the H1, display on the off site page.
Thanks!