Jump to content
php.lv forumi

2 jQuery 1 lapā


Parasts cilvēks

Recommended Posts

Hello tauta

Man te viens jautājums par visu vareno jQuery.

 

Man lapā ir pogas, kuras darbojas izmantojot jQuery, kā arī foto galerija, kas arī darbojas ar jQuary palīdzību.

 

Lieta tāda, ka abi divi kopā viņiem nesanāk strādāt. Strādā vai nu viens, vai otrs. Viss atkarīgs no tā, kurš novietots zemāk :(

 

Varētu lūdzu kāds pastāstīt, kā varētu novērst šo radušos problēmu, lai abi jQuary strādā, kā nākas?

 

Paldies!

Link to comment
Share on other sites

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Untitled Document</title>

<link rel="stylesheet" type="text/css" href="fancybox/jquery.fancybox.css" media="screen" />

 

 

<!--skripts prieks menu-->

<script type="text/javascript" src="Scripts/mootools-for-dropdown.js"> </script>

<script type="text/javascript" src="Scripts/UvumiDropdown-compressed.js"> </script>

 

<script type="text/javascript">

var menu = new UvumiDropdown('pogas');

</script>

<!--menu skripta beigas-->

 

 

 

<!--skripts prieks fotogalerijas-->

<script type="text/javascript" src="fancybox/jquery-1.3.2.min.js"></script>

<script type="text/javascript" src="fancybox/jquery.easing.1.3.js"></script>

<script type="text/javascript" src="fancybox/jquery.fancybox-1.2.1.pack.js"></script>

<script type="text/javascript">

 

$(document).ready(function() {

$("a.gallery, a.iframe").fancybox();

 

url = $("a.modalbox").attr('href').replace("for_spider","content2");

 

$("a.modalbox").attr("href", url);

$("a.modalbox").fancybox(

{

"frameWidth" : 400,

"frameHeight" : 400

 

});

});

</script>

<!--fotogalerijas skripta beigas-->

 

 

 

<style type="text/css">

<!--

body {

background-color: #FFF;

}

div#wrap {

width: 400px;

text-align: left;

margin-right: auto;

margin-top: 10px;

margin-bottom: auto;

margin-left: auto;

}

 

 

-->

</style>

</head>

 

<body>

 

<ul id="pogas">

<li><a href="#">Nosaukums1</a></li>

<li><a href="#">Nosaukums2</a>

<ul style="display:none">

<li><a href="#">Nosaukums2-1</a></li>

<li><a href="#">Nosaukums2-2</a></li>

<li><a href="#">Nosaukums2-3</a></li>

<li><a href="#">Nosaukums2-4</a></li>

</ul>

</li>

<li><a href="#">Nosaukums3</a></li>

<li><a href="#">Nosaukums4</a></li>

</ul>

 

 

 

<div id="wrap">

 

 

<a class="gallery" rel="group" title="" href="bildes/01.jpg" target="_blank"><img src="bildes/01s.jpg" style="border: 1px solid #CCC; padding: 2px; margin: 4px 4px 4px 0" /></a>

<a class="gallery" rel="group" title="" href="bildes/02.jpg" target="_blank"><img src="bildes/02s.jpg" style="border: 1px solid #CCC; padding: 2px; margin: 4px 4px 4px 0" /></a>

<a class="gallery" rel="group" title="" href="bildes/03.jpg" target="_blank"><img src="bildes/03s.jpg" style="border: 1px solid #CCC; padding: 2px; margin: 4px 4px 4px 0" /></a>

<a class="gallery" rel="group" title="" href="bildes/04.jpg" target="_blank"><img src="bildes/04s.jpg" style="border: 1px solid #CCC; padding: 2px; margin: 4px 4px 4px 0" /></a>

<a class="gallery" rel="group" title="" href="bildes/05.jpg" target="_blank"><img src="bildes/05s.jpg" style="border: 1px solid #CCC; padding: 2px; margin: 4px 4px 4px 0" /></a>

<a class="gallery" rel="group" title="" href="bildes/06.jpg" target="_blank"><img src="bildes/06s.jpg" style="border: 1px solid #CCC; padding: 2px; margin: 4px 4px 4px 0" /></a>

<a class="gallery" rel="group" title="" href="bildes/07.jpg" target="_blank"><img src="bildes/07s.jpg" style="border: 1px solid #CCC; padding: 2px; margin: 4px 4px 4px 0" /></a>

 

 

</div>

 

 

</body>

</html>

Link to comment
Share on other sites

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link rel="stylesheet" type="text/css" href="fancybox/jquery.fancybox.css" media="screen" />


<!--skripts prieks menu-->
<script type="text/javascript" src="Scripts/mootools-for-dropdown.js"> </script>
<script type="text/javascript" src="Scripts/UvumiDropdown-compressed.js"> </script>

<script type="text/javascript">
var menu = new UvumiDropdown('pogas');
</script>
<!--menu skripta beigas-->



<!--skripts prieks fotogalerijas-->
<script type="text/javascript" src="fancybox/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="fancybox/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="fancybox/jquery.fancybox-1.2.1.pack.js"></script>
<script type="text/javascript">

	$(document).ready(function() {
$("a.gallery, a.iframe").fancybox();

url = $("a.modalbox").attr('href').replace("for_spider","content2");

$("a.modalbox").attr("href", url);	
$("a.modalbox").fancybox(
{								  
		"frameWidth" : 400,	 
		"frameHeight" : 400 

});
});
</script>
<!--fotogalerijas skripta beigas-->



<style type="text/css">
<!--
body {
background-color: #FFF;
}
div#wrap {
width: 400px;
text-align: left;
margin-right: auto;
margin-top: 10px;
margin-bottom: auto;
margin-left: auto;
	}


-->
</style>
</head>

<body>

<ul id="pogas">
<li><a href="#">Nosaukums1</a></li>
<li><a href="#">Nosaukums2</a>
	<ul style="display:none">
		<li><a href="#">Nosaukums2-1</a></li>
       	<li><a href="#">Nosaukums2-2</a></li>
       	<li><a href="#">Nosaukums2-3</a></li>
       	<li><a href="#">Nosaukums2-4</a></li>
   	</ul>
</li>
<li><a href="#">Nosaukums3</a></li>
<li><a href="#">Nosaukums4</a></li>
</ul>



<div id="wrap">         


       <a class="gallery" rel="group" title="" href="bildes/01.jpg" target="_blank"><img src="bildes/01s.jpg" style="border: 1px solid #CCC; padding: 2px; margin: 4px 4px 4px 0" /></a>
       <a class="gallery" rel="group" title="" href="bildes/02.jpg" target="_blank"><img src="bildes/02s.jpg" style="border: 1px solid #CCC; padding: 2px; margin: 4px 4px 4px 0" /></a>
       <a class="gallery" rel="group" title="" href="bildes/03.jpg" target="_blank"><img src="bildes/03s.jpg" style="border: 1px solid #CCC; padding: 2px; margin: 4px 4px 4px 0" /></a>
       <a class="gallery" rel="group" title="" href="bildes/04.jpg" target="_blank"><img src="bildes/04s.jpg" style="border: 1px solid #CCC; padding: 2px; margin: 4px 4px 4px 0" /></a>
       <a class="gallery" rel="group" title="" href="bildes/05.jpg" target="_blank"><img src="bildes/05s.jpg" style="border: 1px solid #CCC; padding: 2px; margin: 4px 4px 4px 0" /></a>
       <a class="gallery" rel="group" title="" href="bildes/06.jpg" target="_blank"><img src="bildes/06s.jpg" style="border: 1px solid #CCC; padding: 2px; margin: 4px 4px 4px 0" /></a>
       <a class="gallery" rel="group" title="" href="bildes/07.jpg" target="_blank"><img src="bildes/07s.jpg" style="border: 1px solid #CCC; padding: 2px; margin: 4px 4px 4px 0" /></a>


</div>


</body>
</html>

Link to comment
Share on other sites

2easy - nevajadzeja likt to linku. Tā drizumā visas krutās CS un sms šopu lapas saturēs jQuery, Mootools, Prototype, YUI, utt vienlaicīgi un browser'is lietotājiem vnk uzsprāgs :)

 

Parasts cilvēks - pareizāk būtu izvelēties vienu biblioteku. Skaties ko tu lieto vairāk - ja jQuery, tad arī to izvēlies, ja Mootools, tad to.

Link to comment
Share on other sites

2easy - nevajadzeja likt to linku. Tā drizumā visas krutās CS un sms šopu lapas saturēs jQuery, Mootools, Prototype, YUI, utt vienlaicīgi un browser'is lietotājiem vnk uzsprāgs :)

par cs un sms shopiem var īpaši neiespringt. galvenais, lai porno lapas neuzspridzina browseri :D:D:D

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...