Basically I want to create a link that pulls data from 2 different txt files on my server.. lets say #addr and #price
I want my link to look something like..
"bitcoin:' + addr + '?amount=' + price"
Example...
bitcoin:1MgsAHrjke9r769sH5pZdWoC1CcYXZY6oT?amount=0.000456
I have this code pulling the price and addr..
<script>
$(document).ready(function(){
$("#price").load('http://xxxxx.com/price.txt');
});
</script>
<script>
$(document).ready(function(){
$("#addr").load('http://xxxxx.com/addr.txt');
});
</script>
EDIT: Using working code in answer:
Last thing i can't figure out.. how to get...
"<a href='bitcoin:" + $("#addr").text() + "?amount=" + $("#price").text() + "'>TEXTHERE</a>";
to only show the #addr data where TEXTHERE is.. apparently i'm terrible at structuring these links.
Code seems to work at pulling my correct data strings.. just have no clue how to make a working link!
Anyone help? THANK YOU!