Howdy!
I'm still learning a fair bit, and I've done a lot of searching and just cannot find an answer to something that is probably very simple...
I need the id of #itemChange to match the itemID variable.. so if itemID = 20 then I need the html output to send to id #itemChange-20 - however, I am unsure how to add this variable into the .html(data) line. What I have done obviously does not work.
Any help appreciated
I'm still learning a fair bit, and I've done a lot of searching and just cannot find an answer to something that is probably very simple...
I need the id of #itemChange to match the itemID variable.. so if itemID = 20 then I need the html output to send to id #itemChange-20 - however, I am unsure how to add this variable into the .html(data) line. What I have done obviously does not work.
Any help appreciated
Code:
<script>
$(".ajaxSwitchItem").click(function () {
var itemID = $(this).attr("data");
$.ajax({
url: "ajax/php/itemChange.php",
data:'itemID='+itemID,
success: function(data){
$('#itemChange-'+teamID).html(data);
}
});
});
</script>