...

View Full Version : jQuery I have 2 jquery scripts, can't getting them to work at the same time



Lillheaton
11-23-2010, 10:46 AM
Hi,

I have a problem with my two jquery scripts...
When I have them both in the same dokument it won't work.
So my question for you guys is,

Is there some way to make them two working thogeter?

Here is the whole dokument


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>
Test
</title>
<link rel="stylesheet" type="text/css" href="../CSS/accordion_glam.css" />
<!-- If you take away this 3 the scroll works //start -->
<script type="text/javascript" src="../scripts/js/prototype.js"></script>
<script type="text/javascript" src="../scripts/js/scriptaculous.js"></script>
<script type="text/javascript" src="../scripts/js/accordion.js"></script>
<!-- //End -->

<!--This is the scripts for the scroll //Start --->
<link href="tutorsty.css" rel="stylesheet" type="text/css" />
<link href="flexcrollstyles.css" rel="stylesheet" type="text/css" />
<script type='text/javascript' src="flexcroll.js"></script>
<!-- //End --->

<!--The two scripts wont work thogeter //pls help! -->

<link href="../CSS/kontakt.css" rel="stylesheet" type="text/css">
<link href="../CSS/menu_style.css" rel="stylesheet" type="text/css">

<style type="text/css">
<!--
-->
</style>
</head>

<body>
<div id="container">
<div id="logga">

<img src="../image/logga[1].jpg" height="70px" width="431px">

<div id="senasteResultat">
<div id="h6_logga2"><h6>Senaste Resultat</h6></div>
<applet code="StringWalk.class" width=200 height=25>
<param name="delay" value="27">

<param name="fontface" value="Times Roman">
<param name="fontstyle" value="plain">
<param name="fontsize" value="12">

<param name="bgcolor" value="000,000,000">
<param name="fgcolor" value="255,255,255">
<param name="accolor" value="255,000,000">
<param name="bdcolor" value="000,000,000">
<param name="caption0" value="| ----- Senaste Resultat ----- |"><param name="target0" value="_blank">
<table border="0" cellpadding="5" cellspacing="0px" width="200px">
<tr align="center">
<td class="kantlinje"width="300px"><param name="caption1" value="| Malmhaug KFUM IBK - FC Skurup"><param name="target0" value="_blank"></td>
<td class="kantlinje"width="50px"><param name="caption2" value="9-3 |"><param name="target1" value="_blank"></td>
</tr>
<tr align="center">
<td class="kantlinje"width="300px"><param name="caption3" value="| Malmhaug KFUM IBK - JOHANNES KLUG"><param name="target0" value="_blank"></td>
<td class="kantlinje"width="50px"><param name="caption4" value="13-67 |"><param name="target1" value="_blank"></td>
</tr>
<tr align="center">
<td class="kantlinje"width="300px"><param name="caption5" value="| Malmhaug KFUM IBK - EMIL OLSSON"><param name="target0" value="_blank"></td>
<td class="kantlinje"width="50px"><param name="caption6" value="26-89 |"><param name="target1" value="_blank"></td>
</tr>
<tr align="center">
<td class="kantlinje"width="300px"><param name="caption7" value="| Johannes Klug - Emil Olsson"><param name="target0" value="_blank"></td>
<td class="kantlinje"width="50px"><param name="caption8" value="2-3 |"><param name="target1" value="_blank"></td>
</tr>
<tr align="center">
<td class="kantlinje"width="300px"><param name="caption9" value="| Lasse bergqvist - EMIL OLSSON"><param name="target0" value="_blank"></td>
<td class="kantlinje"width="50px"><param name="caption10" value="89-2 |"><param name="target1" value="_blank"></td>
</tr>
</table>
</applet>
</APPLET>
</div>

<div id="kommandeMatcher">
<div id="h6_logga"><h6>Kommande Matcher</h6></div>
<applet code="StringWalk.class" width=200 height=25>
<param name="delay" value="27">

<param name="fontface" value="Times Roman">
<param name="fontstyle" value="plain">
<param name="fontsize" value="12">

<param name="bgcolor" value="000,000,000">
<param name="fgcolor" value="255,255,255">
<param name="accolor" value="255,000,000">
<param name="bdcolor" value="000,000,000">
<param name="caption0" value="| ----- Kommande Matcher ----- |"><param name="target0" value="_blank">
<table border="0" cellpadding="5" cellspacing="0px" width="200px">
<tr align="center">
<td class="kantlinje"width="300px"><param name="caption1" value="| 07/11"><param name="target0" value="_blank"></td>
<td class="kantlinje"width="300px"><param name="caption2" value="Damer div 1"><param name="target0" value="_blank"></td>
<td class="kantlinje"width="50px"><param name="caption3" value="Malmhaug KFUM IBK - FC Skurup |"><param name="target1" value="_blank"></td>
</tr>
<tr align="center">
<td class="kantlinje"width="300px"><param name="caption4" value="| 09/11"><param name="target0" value="_blank"></td>
<td class="kantlinje"width="300px"><param name="caption5" value="Herrar div 1"><param name="target0" value="_blank"></td>
<td class="kantlinje"width="50px"><param name="caption6" value="Malmhaug KFUM IBK - FC Skurup |"><param name="target1" value="_blank"></td>
</tr>
<tr align="center">
<td class="kantlinje"width="300px"><param name="caption7" value="| 10/11"><param name="target0" value="_blank"></td>
<td class="kantlinje"width="300px"><param name="caption8" value="Damer div 2"><param name="target0" value="_blank"></td>
<td class="kantlinje"width="50px"><param name="caption9" value="Malmhaug KFUM IBK - FC Skurup |"><param name="target1" value="_blank"></td>
</tr>
<tr align="center">
<td class="kantlinje"width="300px"><param name="caption10" value="| 24/12"><param name="target0" value="_blank"></td>
<td class="kantlinje"width="300px"><param name="caption11" value="Herrar div 2"><param name="target0" value="_blank"></td>
<td class="kantlinje"width="50px"><param name="caption12" value="Malmhaug KFUM IBK - FC Skurup |"><param name="target1" value="_blank"></td>
</tr>
<tr align="center">
<td class="kantlinje"width="300px"><param name="caption13" value="| 31/1"><param name="target0" value="_blank"></td>
<td class="kantlinje"width="300px"><param name="caption14" value="JAS"><param name="target0" value="_blank"></td>
<td class="kantlinje"width="50px"><param name="caption15" value="Malmhaug KFUM IBK - FC Skurup |"><param name="target1" value="_blank"></td>
</tr>
</table>
</applet>
</APPLET>
</div>
</div>
<div id="ovrelenk">
<ul id="topnav">
<ul id="navigation-1">
<li><a href="start.php" title="Start">Start</a></li> <!--Current -->
<li><a href="klubben.php" title="Klubben">Klubben</a>
<ul class="navigation-2">
<li><a href="klubben_underlenkar/klubbinfo.php" title="Klubbinfo">Klubbinfo</a></li>
<li><a href="kontakt_iframes/iframe_sytelsen.php" title="Bli medlem">Bli medlem</a></li>
<li><a href="#" title="Avgifter">Avgifter</a></li>
<li><a href="#" title="Vision">Vision</a></li>
<li><a href="#" title="Styrdok">Styrdok</a></li>
<li><a href="#" title="Org.plan">Org.plan</a></li>
<li><a href="#" title="Policys">Policys</a></li>
</ul>
</li>
<li><a href="kontakt.php" title="Kontakt">Kontakt</a>
<ul class="navigation-2">
<li><a href="#" title="Styrelse">Styrelse</a></li>
<li><a href="#" title="OpL">OpL</a></li>
<li><a href="#" title="Kansli">Kansli</a></li>
<li><a href="#" title="Ledare">Ledare</a></li>
<li><a href="#" title="Intresseanm">Intresseanm</a></li>
<li><a href="#" title="Sportadmin">Sportadmin</a></li>
</ul>
</li>
<li><a href="nyheter.php" title="Aktuellt">Nyheter</a></li>
<li><a href="#" title="Evenemang">Evenemang</a></li>
<li><a href="#" title="Lag">Lag</a>
<ul class="navigation-2">
<li><a href="#" title="Herrar">Herrar</a></li>
<li><a href="#" title="Damer">Damer</a></li>
<li><a href="#" title="Pojkar">Pojkar</a></li>
<li><a href="#" title="Flikor">Flikor</a></li>
</ul>
</li>
<li><a href="#" title="Blah">Marknad</a>
<ul class="navigation-2">
<li><a href="#" title="Sponsorer">Sponsorer</a></li>
<li><a href="#" title="Spons.alt">Spons.alt</a></li>
</ul>
</li>
<li><a href="#" title="Media">Media</a>
<ul class="navigation-2">
<li><a href="#" title="Pressrel">Pressrel</a></li>
<li><a href="#" title="Mediaklipp">Mediaklipp</a></li>
<li><a href="#" title="Webb-TV">Webb-TV</a></li>
</ul>
</li>
<li><a href="#" title="Arena">Arena</a>
<ul class="navigation-2">
<li><a href="#" title="Foton">Foton</a></li>
<li><a href="#" title="Vägbeskr">Vägbeskr</a></li>
</ul>
</li>
<li><a href="#" title="Biljetter">Biljetter</a>
<ul class="navigation-2">
<li><a href="#" title="Entré">Entré</a></li>
<li><a href="#" title="Säsongskort">Säsongskort</a></li>
</ul>
</li>
<li><a href="#" title="Fans">Fans</a></li>
<li><a href="#" title="Kalender">Kalender</a></li>
<li><a href="#" title="Shop">Shop</a></li>
<li><a href="#" title="Logga in">Logga in</a></li>
</ul>
</ul>
</div>
<!--
<div id="rightbox">
<div id="webbshop">
<img src="../image/shopping_cart.jpg" height="180px" width="200px">
</div>
<div id="kalender">
<iframe src="https://www.google.com/calendar/embed?showTitle=0&amp;showNav=0&amp;showDate=0&amp;showPrint=0&amp;showTabs=0&amp;showCalendars=0&amp;showTz=0&amp;height=180&amp;wk st=2&amp;bgcolor=%23000000&amp;src=emilolsson93%40gmail.com&amp;color=%23125A12&amp;ctz=Europe%2FStockholm" style=" border-width:0 " width="200" height="180" frameborder="0" scrolling="no"></iframe>
</div>
<div id="sponsor">
<img src="../image/ICA.jpg" height="150px" width="200px">
</div>
</div>
-->
<!-- It's here everythings happen, the two jquery -->
<div id="flash">
<div id="test-accordion" class="accordion">
<div class="accordion-toggle">Styrelsen</div>
<div class="accordion-content">
<div id='mycustomscroll' class='flexcroll'>
<table border="0" cellpadding="3" cellspacing="0px" width="745px">
<tr align="center">
<td class="rubrik">Ordförande - Richard Adelstam</td>
<td class="rubrik">Kassör - Rickard Rosengren</td>
<td class="rubrik">Ledamot - Magnus Ehrs</td>
</tr>
<tr align="center">
<td class="kantlinje2">Mail: <a href="mailto:richard.adelstam@bilia.se">richard.adelstam@bilia.se</a><p class="normal">Tel: 0730-74 49 24</p></td>
<td class="kantlinje2">Mail: <a href="040.510273@telia.com">040.510273@telia.com</a><p class="normal">Tel: 08-57884216</p></td>
<td class="kantlinje2">Mail: <a href="persson_vicki@hotmail.com">persson_vicki@hotmail.com</a><p class="normal">Tel: 0707-890241</p></td>
</tr>
<tr align="center">
<td class="rubrik">Ledamot - Susanne Andersson</td>
<td class="rubrik">Ledamot - Magnus Ehrs</td>
<td class="rubrik">Ledamot - Magnus Ehrs</td>
</tr>
<tr align="center">
<td class="kantlinje2">Mail: <a href="bus_andersson@hotmail.com">bus_andersson@hotmail.com</a></td>
<td class="kantlinje2">Mail: <a href="persson_vicki@hotmail.com">persson_vicki@hotmail.com</a><p class="normal">Tel: 0707-890241</p></td>
<td class="kantlinje2">Mail: <a href="persson_vicki@hotmail.com">persson_vicki@hotmail.com</a><p class="normal">Tel: 0707-890241</p></td>
</tr>
<tr align="center">
<td class="rubrik">Ledamot - Håkan Ask</td>
<td class="rubrik">Ledamot - Magnus Ehrs</td>
<td class="rubrik">Ledamot - Magnus Ehrs</td>
</tr>
<tr align="center">
<td class="kantlinje2">Mail: <a href="hakan@oniro.se">hakan@oniro.se</a></td>
<td class="kantlinje2">Mail: <a href="persson_vicki@hotmail.com">persson_vicki@hotmail.com</a><p class="normal">Tel: 0707-890241</p></td>
<td class="kantlinje2">Mail: <a href="persson_vicki@hotmail.com">persson_vicki@hotmail.com</a><p class="normal">Tel: 0707-890241</p></td>

</tr>
<tr align="center">
<td class="rubrik">Ledamot - Håkan Ask</td>
<td class="rubrik">Ledamot - Magnus Ehrs</td>
<td class="rubrik">Ledamot - Magnus Ehrs</td>
</tr>
<tr align="center">
<td class="kantlinje2">Mail: <a href="hakan@oniro.se">hakan@oniro.se</a></td>
<td class="kantlinje2">Mail: <a href="persson_vicki@hotmail.com">persson_vicki@hotmail.com</a><p class="normal">Tel: 0707-890241</p></td>
<td class="kantlinje2">Mail: <a href="persson_vicki@hotmail.com">persson_vicki@hotmail.com</a><p class="normal">Tel: 0707-890241</p></td>
</tr>
</table>
</div>
</div>

<div class="accordion-toggle">Kansli</div>
<div class="accordion-content">
<div id='mycustomscroll' class='flexcroll'>
<iframe src="kontakt_iframes/iframe_kansli.php" name="iframe" width="765" marginwidth="1" height="250" marginheight="1" scrolling="auto" allowtransparency="true" frameborder="0">

</iframe>
</div>
</div>

<div class="accordion-toggle">Ledare</div>
<div class="accordion-content">
<div id='mycustomscroll' class='flexcroll'>
<iframe src="kontakt_iframes/iframe_ledare.php" name="iframe" width="765" marginwidth="1" height="250" marginheight="1" scrolling="auto" allowtransparency="true" frameborder="0">

</iframe>
</div>
</div>

<div class="accordion-toggle">Sportadmin</div>
<div class="accordion-content">
<div id='mycustomscroll' class='flexcroll'>
<iframe src="kontakt_iframes/iframe_sportadmin.php" name="iframe" width="765" marginwidth="1" height="250" marginheight="1" scrolling="auto" allowtransparency="true" frameborder="0">

</iframe>
</div>
</div>
</div>
</div>

<div id="copywrite">
<h1>Malmhaug KFUM — Utbildning mot Elit</h1>
Kontakta oss: <span class="linespacing">Adress: Box 60091, 20061 Limhamn</span> <span class="linespacing4">© 2010 - 2012 Copyright Sweden. Emil Olsson and Johannes Klug</span> <p class="normal">Telefon: <span class="linespacing2">040-304100</span></p> <p class="normal2">E-post: <span class="linespacing3">kansli@malmhaugkfum.se</span></p>
</div>
</div>

</body>
</html>


Sorry for the messy code :P

ps. Im a noob att jquery so a whole code example whould be nice

DanInMa
11-24-2010, 02:59 AM
Uhm, you are not loading Jquery anywhere in your example.
You are loading a different javascript framework, prototype with scriptaculous.
( thanks for the correction spudhead :) Ive never used scriptaculous)

Spudhead
11-24-2010, 11:26 AM
Scriptaculous is built on top of Prototype: you need Prototype for Scriptaculous to work.

The problem is probably with either accordion.js or flexcroll.js although, without seeing either, what's going on is anyone's guess. And yeah, there's no jQuery library going on anywhere.

pillinux
04-07-2011, 02:05 PM
Scriptaculous is built on top of Prototype: you need Prototype for Scriptaculous to work.

The problem is probably with either accordion.js or flexcroll.js although, without seeing either, what's going on is anyone's guess. And yeah, there's no jQuery library going on anywhere.


<script type="text/javascript">
$(document).ready(function() {
$("#accordion").accordion({
autoHeight:false,
change: function(){
fleXenv.initByClass("flexcroll");
}
});
});
</script>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum