amis11 Posted April 9, 2009 Report Share Posted April 9, 2009 (edited) Sveiki! Es mācos strādāt ar HTML un PHP skriptiem, bet tagat esmu nelielā neizpratnē ar vienu kodu! <link rel="stylesheet" type="text/css" href="addons/fancybox/jquery.fancybox.css" media="screen" /> <script type="text/javascript" src="addons/fancybox/jquery-1.3.2.min.js"></script> <script type="text/javascript" src="addons/fancybox/jquery.easing.1.3.js"></script> <script type="text/javascript" src="addons/fancybox/jquery.fancybox-1.2.1.pack.js"></script> <script type="text/javascript"> $(document).ready(function() { $("a").fancybox(); }); </script> <div id="wrap"> <p> <a rel="group" title="Ainava 1" href="img/gallery/2_b.jpg"><img src="img/gallery/2_s.jpg" /></a> <a rel="group" title="Ainava 2" href="img/gallery/3_b.jpg"><img src="img/gallery/3_s.jpg" /></a> <a rel="group" title="Ainava 3" href="img/gallery/4_b.jpg"><img src="img/gallery/4_s.jpg" /></a> </p> </div> </div> <script type="text/javascript"> $(document).ready(function() { $("a").fancybox(); }); </script> Kā lai norāda lai šī funkcija strādā tikai uz a elementiem kuri ir zemāk proti attēliem, nevis visiem linkiem, kuri ir lapā? (mabye tomēr nepareizajā vietā ieliku, bet ceru uz sapratni) DEMO >>Šeit<< Viss itkā ir normāli līdz bridim kad vēlos pāriet uz Sākums! Edited April 9, 2009 by amis11 Quote Link to comment Share on other sites More sharing options...
Val Posted April 9, 2009 Report Share Posted April 9, 2009 man domāt, ka <script type="text/javascript"> $(document).ready(function() { $("a.blablabla").fancybox(); }); </script> un vajadzīgajiem linkiem pielikt klasi "blablabla", tipa <a class="blablabla">img</a> Quote Link to comment Share on other sites More sharing options...
xPtv45z Posted April 9, 2009 Report Share Posted April 9, 2009 Var arī nelikt un $('#wrap a').fancybox(); Quote Link to comment Share on other sites More sharing options...
amis11 Posted April 9, 2009 Author Report Share Posted April 9, 2009 man domāt, ka <script type="text/javascript"> $(document).ready(function() { $("a.blablabla").fancybox(); }); </script> un vajadzīgajiem linkiem pielikt klasi "blablabla", tipa <a class="blablabla">img</a> Šis variants nostrādāja! Liels Paldies! :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.