Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Efekt "click" (wcisniecia) w jquery
AndyPSV
post
Post #1





Grupa: Zarejestrowani
Postów: 393
Pomógł: 5
Dołączył: 6.02.2003
Skąd: The.Luciferian.Doctrine.p
df

Ostrzeżenie: (30%)
XX---


http://img3.imageshack.us/img3/7678/clickajax.gif

chodzi o to w jaki sposob zrobic "wcisniecie" (i aby bylo one przekazane w formularzu)
moglby ktos podac jakis przyklad lub gotowy skrypt? (mysle, ze jest bardzo prosty)
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
AndyPSV
post
Post #2





Grupa: Zarejestrowani
Postów: 393
Pomógł: 5
Dołączył: 6.02.2003
Skąd: The.Luciferian.Doctrine.p
df

Ostrzeżenie: (30%)
XX---


mam tylko to:

wyzwanie polega tylko na tym, ze istnieje mozliwosc wcisniecia NARAZ dwoch przyciskow, chce aby bylo mozna wcisnac tylko jeden
czyli jak np. wcisne jeden i bede chcial drugi wcisnac -> zmienia sie zaznaczenie na ten drugi

zrozumiales wszystko?

  1. <script type='text/javascript'>
  2. /* <![CDATA[ */
  3. jQuery(function($){
  4. $("#thumbdown").mousedown(function(){
  5. $(this).css("background","<% $TPL %>i/ico/thumb_down_.png");
  6. $(this).attr("src","<% $TPL %>i/ico/thumb_down.png");
  7. }).mouseup(function(){
  8. $(this).click();
  9. wyslij(0);
  10. })
  11. });
  12.  
  13. jQuery(function($){
  14. $("#thumbup").mousedown(function(){
  15. $(this).css("background","<% $TPL %>i/ico/thumb_up_.png");
  16. $(this).attr("src","<% $TPL %>i/ico/thumb_up.png");
  17. }).mouseup(function(){
  18. $(this).click();
  19. wyslij(1);
  20. })
  21. });
  22. /* ]]> */
  23. </script>
  24.  
  25. function wyslij(typ){
  26. $(":input[name=type_thumb]").val(typ)
  27. $("form[name=thumb]").submit();
  28. }
  29. </script>
  30.  
  31. <br/><br/>
  32. <div class="reference">
  33. <h5><% $_[references]|upper %></h5><br/>
  34. <% $_[reference_nfo] %><br/>
  35.  
  36. <form action='<% $URL %><% $_GET[0] %>/reference' method='post'>
  37. <div>
  38. <input type='hidden' name='review' value='<% $HIDE %>'/>
  39. <input type="hidden" name="type_thumb">
  40.  
  41. <div style='padding-top:5px'><div class='l'><img src='<% $TPL %>i/ico/thumb_up_.png' id='thumbup' alt='thumb up'/> <img src='<% $TPL %>i/ico/thumb_down_.png' id='thumbdown' alt='thumb down'/>
  42. <input type='text' name='reference' id='reference' maxlength="999" style='width:195px' value='<% $r[reference] %>' title='<% $_[leave_reference] %>'/>&nbsp;</div><div class='l'><% include file = $TPLx.'m/_/save'.$HTML %></div><div class='f'></div></div>
  43. </div>
  44. </form>
  45.  
  46.  
  47. </div>
  48. <div class='low' style='padding-left:10px'><% $_[reference_nfo2] %></div>
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 5.10.2025 - 00:21