View Single Post
Old 01-22-2011, 10:11 PM   PM User | #8
sjames0077
New to the CF scene

 
Join Date: Jan 2011
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
sjames0077 is an unknown quantity at this point
still cant get this to work - any help please !

I have a query.js and a lightbox.js javascripts running on the same page and they are conflicting. They both work great separately but when combined the scripts stop working.


I've reference'd this solution:



<script>
jQuery.noConflict();

// Use jQuery via jQuery(...)
jQuery(document).ready(function(){
jQuery("div").hide();
});

// Use Prototype with $(...), etc.
$('someid').hide();
</script>




However, I am unsure of what to do with it. The forum referenced changing the name of the 'someid' but I don't know what to change it to.



Here are my conflicting codes:



<script src="scripts/prototype.js" type="text/javascript"></script>
<script src="scripts/lightbox.js" type="text/javascript"></script>



<script>
jQuery.noConflict();

// Use jQuery via jQuery(...)
jQuery(document).ready(function(){
jQuery("div").hide();
});

// Use Prototype with $(...), etc.
$('someid').hide();
</script>




<script src="http://jqueryjs.googlecode.com/files/jquery-1.3.1.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery('.boxgrid.caption').hover(function(){
jQuery(".cover", this).stop().animate({top:'50px'},{queue:false,duration:160});
}, function() {
jQuery(".cover", this).stop().animate({top:'300px'},{queue:false,duration:160});
});
});
</script>

Thanks for any help I'm so lost
sjames0077 is offline   Reply With Quote