1

I'm trying to use the jQuery Datepicker and a JavaCcript scrollbar on one page. But if I declare both in the header file one does not work, is there a way I can fix this but still use both? I've tried the following but to no success:

var $j = jQuery.noConflict();
$j("#datepicker").datepicker();
asked May 8, 2012 at 12:25
1

3 Answers 3

2

try :

jQuery.noConflict();
jQuery("#datepicker").datepicker();
answered May 8, 2012 at 12:27
Sign up to request clarification or add additional context in comments.

Comments

1

You can resolve conflict and still use $ like this:

jQuery(function($){
 $("#datepicker").datepicker();
})(jQuery)
answered May 8, 2012 at 12:36

Comments

1
<script src="prototype.js"></script>
<script src="effects.js"></script>
<script src="jquery.js"></script>
<script type="text/javascript">
jQuery.noConflict();
 jQuery(document).ready(function($){
 jQuery("a").click(function(){
 //Effect.Shake('shake_demo');//this is prototype.js function
 //jQuery("#datepicker").datepicker();//for suing Jquery function
 });
});
</script>
<body>
<div id="shake_demo" style="width:150px; height:40px; background:#ccc; text-align:center;">
 <a href="#" style="line-height:40px;">Click me to shake!</a>
</div>
<a id="aClick" class="aClick" href="#" style="line-height:40px;">Click me to shake!</a>
</body>
answered May 8, 2012 at 12:33

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.