SIMPLE jQuery question

Discussion in 'Programming' started by je61, Oct 30, 2010.

  1. #1
    I am getting a jQuery application form developed for my site ( http://cracktubes.com/project/autoink/newapplication12.php ) and under the category "Condition" i'd like to have 5 selectable stars to choose from to rank your vehicles condition, like i had on my old site, but it wasnt jQuery. My current developer is saying this is impossible, but i find that hard to believe.
    can anyone lend me some help?
    thanks
     
    je61, Oct 30, 2010 IP
  2. wing

    wing Active Member

    Messages:
    210
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    58
    #2
    Just to give a hint..
    <html> 
      <head> 
      <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
     
        <script type="text/javascript"> 
        $(function() {
        	$('.rate').click(function () {
        		$('#rating').val($(this).attr('title'));
        	});
        });
    
        </script> 
        </head> 
        <body> 
     
        <form>
        
        <img class="rate" src="blablabla.jpg" title="1">
        <img class="rate" src="blablabla.jpg" title="2">
        <img class="rate" src="blablabla.jpg"  title="3">
        <img class="rate" src="blablabla.jpg" title="4">
        <img class="rate" src="blablabla.jpg" title="5">
        
        <input type="text" name="rating" id="rating">
        
        </form>
    
       </body> 
      </html>
    HTML:
    Of course a hidden field would be used to send the value.

    :)
     
    wing, Oct 30, 2010 IP
  3. paulgordelo

    paulgordelo Peon

    Messages:
    47
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    yeh wing is right.
     
    paulgordelo, Oct 30, 2010 IP