Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [jQuery] Konflikt jquery-1.4.4.js z jquery.lightbox
TheRiko
post
Post #1





Grupa: Zarejestrowani
Postów: 37
Pomógł: 1
Dołączył: 10.09.2006

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


Witam.

Posiadam konflikt lightboxa jquery ze sliderem facebooka, ktory rowniez jest wykonany w jquery.
  1. <script type="text/javascript" src="js/jquery.js"></script>
  2. <script type="text/javascript" src="js/jquery.lightbox-0.5.js"></script>
  3. <script type="text/javascript">
  4. $(function() {
  5. // Use this example, or...
  6. $('a[@rel*=lightbox]').lightBox(); // Select all links that contains lightbox in the attribute rel
  7. });
  8.  
  9. <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.4.js"></script>
  10. <script type="text/javascript">
  11. $(document).ready(
  12. function()
  13. {
  14. $("#fb").mouseenter(function()
  15. {
  16. $(this).stop().animate({right: 0}, "normal");
  17. }).mouseleave(function()
  18. {
  19. $(this).stop().animate({right: -205}, "normal");
  20. });;
  21. });

Wiem, że należy wykonać jQuery.noConflict(); ale nie wiem jak to zrobić. Pomoże ktoś?

Ten post edytował TheRiko 13.04.2012, 23:27:13
Go to the top of the page
+Quote Post
tolomei
post
Post #2





Grupa: Zarejestrowani
Postów: 450
Pomógł: 135
Dołączył: 18.11.2010
Skąd: Wschowa

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


Witaj.

Masz podpięte jQuery 2 razy.
Najlepiej ściągnij sobie najnowszą wersję jQuery czyli v1.7.2(LINK), załącz go na samej górze.
Pod nim załącz skrypt jquery.lightbox-0.5.js.
Zobacz czy będzie działać.

Pozdrawiam.

Ten post edytował tolomei 14.04.2012, 00:46:17
Go to the top of the page
+Quote Post
TheRiko
post
Post #3





Grupa: Zarejestrowani
Postów: 37
Pomógł: 1
Dołączył: 10.09.2006

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


Niestety to nie pomaga. Dalej jest to samo.
Go to the top of the page
+Quote Post
tolomei
post
Post #4





Grupa: Zarejestrowani
Postów: 450
Pomógł: 135
Dołączył: 18.11.2010
Skąd: Wschowa

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


Spróbuj tak:

  1. <script type="text/javascript" src="js/jquery.js"></script>
  2. <script type="text/javascript" src="js/jquery.lightbox-0.5.js"></script>
  3. <script type="text/javascript">
  4. $(function() {
  5. // Use this example, or...
  6. $('a[@rel*=lightbox]').lightBox(); // Select all links that contains lightbox in the attribute rel
  7. });
  8. </script>
  9.  
  10. <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.4.js"></script>
  11. <script type="text/javascript">
  12. var jq = jQuery.noConflict();
  13. jq(document).ready(
  14. function()
  15. {
  16. jq("#fb").mouseenter(function()
  17. {
  18. jq(this).stop().animate({right: 0}, "normal");
  19. }).mouseleave(function()
  20. {
  21. jq(this).stop().animate({right: -205}, "normal");
  22. });;
  23. });
  24. </script>
Go to the top of the page
+Quote Post
TheRiko
post
Post #5





Grupa: Zarejestrowani
Postów: 37
Pomógł: 1
Dołączył: 10.09.2006

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


Działa (IMG:style_emoticons/default/smile.gif) Stokrotne dzięki!
Go to the top of the page
+Quote Post

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: 23.08.2025 - 15:50