I have a simple jQuery question with the following code:
<script>
$(document).ready(function() {
$("#changeText").click(function() {
$.get("test.php", { sectid: "1"},
function(data){
$("#textBox").html(data);
});
});
});
</script>
My HTML is as follows:
<a id="changeText" href="#">Change</a>
<div id="textBox">This text will be changed to something else</div>
I'd like to pass a variable into the .click function in place of "1" but can't seem to get the syntax correct. Can someone point me the right direction?
Thanks.