using JQuery and Prototype in the same page; more explanation needed!

Posted by xenogen on Stack Overflow See other posts from Stack Overflow or by xenogen
Published on 2010-04-03T05:05:14Z Indexed on 2010/04/03 5:13 UTC
Read the original article Hit count: 381

Filed under:
|
|

Hi everybody!

I'm continuously having the problem when i use jquery lightbox (which runs prototype) and jquery news slider.

I tried the "noconflict" method.

The problem is I don't know the exact place to put the code.

So, here, i'm putting my scripts within .

So, please troubleshoot it and explain me where to put the patch.

thank you very much.

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

<title>Jquery</title> 

<script type="text/javascript" src="lb/js/prototype.js"></script>
<script type="text/javascript" src="lb/js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="lb/js/lightbox.js"></script>
<link href="lb/css/lightbox.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="news/jquery-1.2.3.pack.js"></script>
<script type="text/javascript" src="news/jquery.easynews.js"></script>



<style>
html
{ background-color: #FFA928;
font: normal 76% "Arial", "Lucida Grande",Verdana,  Sans-Serif;
 color:black;
 }
a { text-decoration: none; font-weight: bold; }

.news_style{
display:none;
}
.news_show
{
background-color: white;
color:black;
width:350px;
height:150px;
font: normal 100% "Arial", "Lucida Grande",Verdana,  Sans-Serif;
overflow: auto; 

}
.news_border
{
background-color: white;
width:350px;
height:150px;
font: normal 100% "Arial", "Lucida Grande",Verdana,  Sans-Serif;
border: 1px solid gray;
padding: 5px 5px 5px 5px;
overflow: auto; 

}
.news_mark{
background-color:white ;
font: normal 70% "Arial", "Lucida Grande",Verdana,  Sans-Serif;
border: 0px solid gray;
width:361px;
height:35px;
color:black;
text-align:center;
}
.news_title{
font: bold 120% "Arial", "Lucida Grande",Verdana,  Sans-Serif;
border: 0px solid gray;
padding: 5px 0px 9px 5px;
color:black;
}
.news_show img{

margin-left: 5px;
margin-right: 5px;

}
.buttondiv
{
position: absolute;
/*float: left;*/
/*top: 169px;*/
padding: 5px 5px 5px 5px;
background-color:white ;
border: 1px solid gray;
/*border-top-color: white;*/
border-top:none;
height:20px;
}

</style>
<script>
$(document).ready(function(){
var newsoption1 = {
  firstname: "mynews",
  secondname: "showhere",
  thirdname:"news_display",
  fourthname:"news_button",
   newsspeed:'6000'
}
$.init_news(newsoption1);


var myoffset=$('#news_button').offset();

var mytop=myoffset.top-1;

$('#news_button').css({top:mytop});

});
</script>

</head>

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about prototype