Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [HTML][AJAX] Jak to podświetlić?, Podświetlenie własnego obrazka
MateuszS
post
Post #1





Grupa: Zarejestrowani
Postów: 1 429
Pomógł: 195
Dołączył: 6.10.2008
Skąd: Kraków/Tomaszów Lubelski

Ostrzeżenie: (0%)
-----


Oto kod. Chcę podświetlić obrazek header.jpg jednak nie wiem jak. Jest on jakby linkiem do wysuwanego menu.

  1. <script type="text/javascript" src="js/mintAjax.js"></script>
  2. <script type="text/javascript" src="js/kolorowetlo.js"></script>
  3. <script type="text/javascript" src="js/bajery.js"></script>
  4. <script type="text/javascript" src="js/wysmenu.js"></script>
  5.  
  6. </head>
  7. <body bgcolor="B7C059" width="100%" height="100%">
  8.  
  9.  
  10. <div style="margin-top: 10px; margin-left: 10px;">
  11. <dl id="menu0">
  12. <dt><img src="images/header.jpg"> </dt>
  13.  
  14. <dd>Element 1.1</dd>
  15.  
  16. <dt>Nagłówek 2</dt>
  17. <dd>Element 2.1</dd>
  18. <dd>Element 2.2</dd>
  19. <dd>Element 2.3</dd>
  20. <dt>Nagłówek 3</dt>
  21. <dd>Element 3.1</dd>
  22. <dd>Element 3.2</dd>
  23. <dd>Element 3.3</dd>
  24. </dl>
  25. </div>
  26.  
  27. <script type="text/javascript">
  28. // <![CDATA[
  29. new Menu('menu0');
  30. // ]]>
  31.  
  32. </body>
  33. </html>


i Ajax
  1. function ColorIn() {
  2. mint.fx.Color("box", "backgroundColor", null, "B22222", 20, 500);
  3. mint.fx.Color("box", "borderColor", null, "000000", 20, 500);
  4. }
  5.  
  6. function ColorOut() {
  7. mint.fx.Color("box", "backgroundColor", null, "B7C059", 20, 500);
  8. mint.fx.Color("box", "borderColor", null, "8F9D11", 20, 500);
  9. }

Tego kodu ajaxa nie wiedzialem jak zmodyfikowac aby mi pasowal pod ten moj obrazek. Prosze o pomoc


--------------------
O! Zimniok :P
Go to the top of the page
+Quote Post
gebp
post
Post #2





Grupa: Zarejestrowani
Postów: 180
Pomógł: 6
Dołączył: 10.04.2006

Ostrzeżenie: (0%)
-----


  1. <script type="text/javascript" src="js/mintAjax.js"></script>
  2. <script type="text/javascript" src="js/kolorowetlo.js"></script>
  3. <script type="text/javascript" src="js/bajery.js"></script>
  4. <script type="text/javascript" src="js/wysmenu.js"></script>
  5. <script type="text/javascript">
  6. // <![CDATA[
  7. function ColorIn() {
  8. mint.fx.Color("obrazek", "backgroundColor", null, "B22222", 20, 500);
  9. }
  10. function ColorOut() {
  11. mint.fx.Color("obrazek", "backgroundColor", null, "B7C059", 20, 500);
  12. }
  13. // ]]>
  14.  
  15. </head>
  16. <body bgcolor="B7C059" width="100%" height="100%">
  17.  
  18.  
  19. <div style="margin-top: 10px; margin-left: 10px;">
  20. <dl id="menu0">
  21. <dt id="obrazek" style="background-color: white;" onmouseover="ColorIn()" onmouseout="ColorOut()"><img src="images/header.jpg"> </dt>
  22.  
  23. <dd>Element 1.1</dd>
  24.  
  25. <dt>Nagłówek 2</dt>
  26. <dd>Element 2.1</dd>
  27. <dd>Element 2.2</dd>
  28. <dd>Element 2.3</dd>
  29. <dt>Nagłówek 3</dt>
  30. <dd>Element 3.1</dd>
  31. <dd>Element 3.2</dd>
  32. <dd>Element 3.3</dd>
  33. </dl>
  34. </div>
  35.  
  36. </body>
  37. </html>


czytaj!
Go to the top of the page
+Quote Post
MateuszS
post
Post #3





Grupa: Zarejestrowani
Postów: 1 429
Pomógł: 195
Dołączył: 6.10.2008
Skąd: Kraków/Tomaszów Lubelski

Ostrzeżenie: (0%)
-----


Wtedy podkreśli tylko div za obrazkiem ale obrazka juz nie sad.gif


--------------------
O! Zimniok :P
Go to the top of the page
+Quote Post
gebp
post
Post #4





Grupa: Zarejestrowani
Postów: 180
Pomógł: 6
Dołączył: 10.04.2006

Ostrzeżenie: (0%)
-----


Może źle zrozumiałem
Cytat
Chcę podświetlić obrazek

Co przez to rozumiesz?
Go to the top of the page
+Quote Post
MateuszS
post
Post #5





Grupa: Zarejestrowani
Postów: 1 429
Pomógł: 195
Dołączył: 6.10.2008
Skąd: Kraków/Tomaszów Lubelski

Ostrzeżenie: (0%)
-----


Ok no nic juz zrobilem trosia inaczej i tez jest dobrze. Dzieki i przepraszam za klopot.

Ok żeby nie tworzyć nowego tematu niepotrzebnie:

Mam takie coś:
  1. <div style="margin-top: 10px; margin-left: 10px;">
  2. <dl id="menu0">
  3. <dt><div id="box" class="box" onmouseover="ColorIn()" onmouseout="ColorOut()"></div> </dt>
  4.  
  5. <dd>Element 1.1</dd>
  6.  
  7. <dt><div id="box" class="box1" onmouseover="ColorIn()" onmouseout="ColorOut()"></div></dt>
  8. <dd>Element 2.1</dd>


  1. div.box {
  2. background-image: url("images/header.jpg");
  3. position:relative; -moz-border-radius: 8px; border-radius: 8px;
  4. height: 28px; width: 206px;
  5. border: 3px solid #8F9D11;
  6. margin-bottom: 5px;
  7. }
  8.  
  9. div.box1 {
  10. background-image: url("images/header2.jpg");
  11. position:relative; -moz-border-radius: 8px; border-radius: 8px;
  12. height: 28px; width: 206px;
  13. border: 3px solid #8F9D11;
  14. }


  1. function ColorIn() {
  2. mint.fx.Color("box", "backgroundColor", null, "#6B8E23", 20, 500);
  3. mint.fx.Color("box", "borderColor", null, "#006400", 20, 500);
  4. }
  5.  
  6. function ColorOut() {
  7. mint.fx.Color("box", "backgroundColor", null, "#228D22", 20, 500);
  8. mint.fx.Color("box", "borderColor", null, "#8F9D11", 20, 500);
  9. }


Powinny sie podswietlac oba buttony, jednak podswietla sie tylko gorny. O co moze chodzic?

Ten post edytował MateuszScirka 3.02.2009, 21:07:54


--------------------
O! Zimniok :P
Go to the top of the page
+Quote Post
isso
post
Post #6





Grupa: Zarejestrowani
Postów: 296
Pomógł: 32
Dołączył: 3.01.2005

Ostrzeżenie: (0%)
-----


wydaje mi się, że w jQuery ;> addClass byłby prostszy... ale moge się mylić...


--------------------
Go to the top of the page
+Quote Post
MateuszS
post
Post #7





Grupa: Zarejestrowani
Postów: 1 429
Pomógł: 195
Dołączył: 6.10.2008
Skąd: Kraków/Tomaszów Lubelski

Ostrzeżenie: (0%)
-----


Ale to jest Ajax ;] Moze ktos wie czemu sie 2 nie podswietla sad.gif


--------------------
O! Zimniok :P
Go to the top of the page
+Quote Post
isso
post
Post #8





Grupa: Zarejestrowani
Postów: 296
Pomógł: 32
Dołączył: 3.01.2005

Ostrzeżenie: (0%)
-----


Cytat(MateuszScirka @ 3.02.2009, 21:30:00 ) *
Ale to jest Ajax ;]



... hmmm czy ja wiem? kurcze... to takie dość złożone... no niby jest to asynchroniczny javascript i xml ;] chociaż, ja bym jednak obstawiał przy tym, że głównym celem działania AJAX`u było "behind the scenes"... ale raczej zwiazane z przetwarzaniem danych... no ale może...?;]

Tzn. no może faktycznie racja, że jest;] z tym, że akurat jQuery to raczej Framework ;]


--------------------
Go to the top of the page
+Quote Post
MateuszS
post
Post #9





Grupa: Zarejestrowani
Postów: 1 429
Pomógł: 195
Dołączył: 6.10.2008
Skąd: Kraków/Tomaszów Lubelski

Ostrzeżenie: (0%)
-----


Ja tam w tym nowy jestem ;] Mialem ochote troche sie graficznymi efektami pobawic. Musze zrobic strone na Infe wiec czemu nie dzieki Ajaxowi ;]


--------------------
O! Zimniok :P
Go to the top of the page
+Quote Post
isso
post
Post #10





Grupa: Zarejestrowani
Postów: 296
Pomógł: 32
Dołączył: 3.01.2005

Ostrzeżenie: (0%)
-----


nie no, racja, racja... ale jQuery jest proste smile.gif weź sam zobacz smile.gif na pewno nie pożałujesz:)


--------------------
Go to the top of the page
+Quote Post
matixrr
post
Post #11





Grupa: Zarejestrowani
Postów: 207
Pomógł: 44
Dołączył: 14.04.2007

Ostrzeżenie: (0%)
-----


  1. <?php
  2. <script type="text/javascript">
  3.  
  4. function ColorIn1() {
  5. mint.fx.Color("box", "backgroundColor", null, "#6B8E23", 20, 500);
  6. mint.fx.Color("box", "borderColor", null, "#006400", 20, 500);
  7. }
  8. function ColorIn2() {
  9. mint.fx.Color("box2", "backgroundColor", null, "#6B8E23", 20, 500);
  10. mint.fx.Color("box2", "borderColor", null, "#006400", 20, 500);
  11. }
  12.  
  13. function ColorOut1() {
  14. mint.fx.Color("box", "backgroundColor", null, "#228D22", 20, 500);
  15. mint.fx.Color("box", "borderColor", null, "#8F9D11", 20, 500);
  16. }
  17. function ColorOut2() {
  18. mint.fx.Color("box2", "backgroundColor", null, "#228D22", 20, 500);
  19. mint.fx.Color("box2", "borderColor", null, "#8F9D11", 20, 500);
  20. }
  21.  
  22. </script>
  23. </head>
  24. <body>
  25. <div style="margin-top: 10px; margin-left: 10px;">
  26. <dl id="menu0">
  27. <dt><div id="box" class="box" onmouseover="ColorIn1()" onmouseout="ColorOut1()"></div> </dt>
  28.  
  29. <dd>Element 1.1</dd>
  30.  
  31. <dt><div id="box2" class="box2" onmouseover="ColorIn2()" onmouseout="ColorOut2()"></div></dt>
  32. <dd>Element 2.1</dd>
  33. <dd>Element 2.1</dd>
  34. </body>
  35. ?>


--------------------
Pomogłem? Zmotywuj mnie do dalszej pracy i kliknij magiczny przycisk:

Go to the top of the page
+Quote Post
MateuszS
post
Post #12





Grupa: Zarejestrowani
Postów: 1 429
Pomógł: 195
Dołączył: 6.10.2008
Skąd: Kraków/Tomaszów Lubelski

Ostrzeżenie: (0%)
-----


Dziala sposob matixrr'a. Dziekuje.


--------------------
O! Zimniok :P
Go to the top of the page
+Quote Post

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

 



RSS Aktualny czas: 20.08.2025 - 06:18