Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> width() i problem z IE
omxd
post
Post #1





Grupa: Zarejestrowani
Postów: 135
Pomógł: 0
Dołączył: 18.05.2010

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


Witam serdecznie,
trochę namęczyłem się już z tym width() i gdy myślałem ,że jestem w domu pojawił się problem którego nie mogę zrozumieć.Gdy klikam w zdjecie uzykuje (w alertach) wysokość i szerokość jednak w ie uzykuję je dopiero za drugim kliknięciem.W pozostałych przeglądarkach działa jak należy.
live : http://ecofreshmyjnia.pl/semsstudio/border/# (portfolio -> print -> klikniecie w któryś ze zdjęć).
  1. $('.powiekszenie').click(function(){
  2.  
  3. var $img_id = this.id,
  4. $img = "<img src=http://ecofreshmyjnia.pl/semsstudio/border/data/photo/" + $img_id + ">",
  5. $img_path = "http://ecofreshmyjnia.pl/semsstudio/border/data/photo/" + $img_id,
  6. $img_halfwidth = null,
  7. $img_halfheight = null;
  8.  
  9. $('#photo').html($img);
  10. $("#photo img").one("load", function(){
  11. var img = this;
  12. setTimeout(function(){
  13. var $img_width = img.width;
  14. var $img_height = img.height;
  15. alert($img_width);
  16. alert($img_height);
  17. $img_halfwidth = "-" + $img_width / 2 + "px";
  18. $img_halfheight = "-" + + (($img_height/2)+5) + "px";
  19.  
  20. $('#portfolio_frame').fadeIn().animate({
  21. "bottom":"50%",
  22. "left":"50%",
  23. "marginLeft" : $img_halfwidth,
  24. "marginBottom" : $img_halfheight
  25. }, 500, function() {});
  26. }, 0);
  27. });
  28.  
  29. });

Czy ktoś jest w stanie mi coś doradzić?

pozdrawiam
Go to the top of the page
+Quote Post

Posty w temacie
- omxd   width() i problem z IE   13.08.2012, 15:41:49
- - erix   Która wersja IE?   14.08.2012, 10:05:43


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: 19.08.2025 - 02:26