help with passing variable to ajax
- <script>
- $(document).ready(function(){
-
-
- $('td img').click(function(){
- alert($(this).attr('id'));
- });
-
-
- $.ajax({
- type: "POST",
- url: "some.php",
- data: "id=" + id,
- success: function(data){
- alert( "Data" );
-
- }
- });
-
- });
- </script>
- I am new to jquery and I was wondering on how to send the id of the image I clicked on to a ajax call.