Jump to content
php.lv forumi

Kā lai ierobežo a elementus?


amis11

Recommended Posts

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 by amis11
Link to comment
Share on other sites

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>

Link to comment
Share on other sites

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! :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...