Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [jQuery] zmiena CSS działa mi tylko pod Gecko(Firefox, Flock itp)
Adrem
post
Post #1





Grupa: Zarejestrowani
Postów: 5
Pomógł: 0
Dołączył: 15.06.2006

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


Mam taki kod
  1. <script type="text/javascript">
  2. $(document).ready(function(){
  3. $("div.orangebox").hover(function () {
  4. $(this).css({ "background-color":"#FDB913", "font-weight":"bolder" });
  5. }, function () {
  6. var cssObj = {
  7. "backgroundColor": "#DE5F28",
  8. "fontWeight": "",
  9.  
  10. }
  11. $(this).css(cssObj);
  12. });
  13.  
  14. });
  15. </script>

Nie działa mi on pod Operą i IE. Napisałem go na podstawie .
Jeżeli chodzi o JS i jQuery jest to moje pierwsze podejście, więc proszę o wyrozumiałość:)
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
nospor
post
Post #2





Grupa: Moderatorzy
Postów: 36 559
Pomógł: 6315
Dołączył: 27.12.2004




twoj blad nie ma zadnego zwiazku jquery.
Kod
$(document).ready(function(){
$("div.orangebox").hover(function () {
$(this).css({ "background-color":"#FDB913", "font-weight":"bolder" });
}, function () {
var cssObj = {
"backgroundColor": "#DE5F28",
"fontWeight": ""

}
$(this).css(cssObj);
});

});

A teraz dziala? (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
A teraz Quiz: co zmienilem? (IMG:http://forum.php.pl/style_emoticons/default/winksmiley.jpg)
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: 3.10.2025 - 15:49