
-----------------------------------
nonamedude
Wed Jun 08, 2011 12:38 pm

Jquery, printing to a specific class;
-----------------------------------
Hey guys;

Im having a bit of a problem when printing out something to html using jquery. I want to print to a specific class which has a specific id but so far I can only print to a specific id.

[code]      $('a.commentup').bind('click',function()
                {
                    var myid = $(this).attr('id');
                    var myid2 = $('a.common').attr('id');   
                    var newValue = parseInt(myid) + 1000;
                    
                    $.get(
                    "http://localhost/hurdit/includes/comment.php?id="+myid+"&storyID="+myid2,
                    null,
                    function(data) {
                        var value = data;
                      
                        var divId = parseInt(myid) + 2000;
                        if( value == 'log' ) {
                            alert ("You have to be logged on to rate stories");
                        }
                       else{
	 $( "#" + myid + " img").attr("src","images/thumbup_blue.png");
                    $( "#" + (newValue) + " img").attr("src","images/thumbdown_gray.png");
                         $( "#" + divId).html(value);} // 