Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [JavaScript]Skrypt js nie działa pod IE
pspgor
post
Post #1





Grupa: Zarejestrowani
Postów: 81
Pomógł: 0
Dołączył: 27.02.2011

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


Witam. Posiadam pewien skrypt. Lecz nie działa on pod przeglądarką IE. Nie chodzi mi o stare wersje, lecz o te nowsze.

  1. var imageBlockWidth = 320;
  2.  
  3. $(document).ready(function () {
  4.  
  5. $('.praca>a').mouseover(function (event) {
  6.  
  7. var workDiv = $(event.target).parent().parent();
  8. workDiv.find('#info').show();
  9.  
  10. var blocksByDiv = ( $('#content').width() - ( $('#content').width() % imageBlockWidth ) ) / imageBlockWidth;
  11. var indexInRow = ($('#content>.praca').index(workDiv)+2) % blocksByDiv;
  12. console.log(indexInRow);
  13.  
  14. console.log($('#content>.praca').index(workDiv), $('#content>.praca').children().size()/2);
  15.  
  16. if ( $('#content>div').index(workDiv) != 0 && indexInRow == 0 || $('#content>div').index(workDiv) == $('#content>.praca').children().size()/2) {
  17. workDiv.find('#info').css('margin-left', '-'+ imageBlockWidth +'px');
  18. } else {
  19. workDiv.find('#info').css('margin-left', imageBlockWidth +'px');
  20. }
  21.  
  22. });
  23.  
  24. $('.praca>a').mouseleave(function (event) {
  25. $(this).parent().parent().find('#info').hide();
  26. });
  27.  
  28. });


Chodzi głównie o nadanie odpowiednich css.
W jaki sposób można to 'naprawić'?

Ten post edytował pspgor 7.04.2012, 10:56:11
Go to the top of the page
+Quote Post

Posty w temacie


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 - 13:04