Reputation: 6242
I'm trying to insert two Element Id's right in the middle of a hyperlink contained within a JSON (JSON-P) get request using jQuery. Any suggestions?
function doFunction(id1,id2) {
$.getJSON("http://google.com/[id1]/[id2]?callback=?");
}
Upvotes: 0
Views: 131
Reputation: 129812
Not sure I follow; is this what you're looking for?
function doFunction(id1,id2) {
$.getJSON("http://google.com/" + id1 + "/" + id2 + "?callback=?");
}
Upvotes: 2