[jQuery] Errors with Animation with Jquery 1.3
I get this error when using UI and other animation effects
o.speed is not a function
Cannot seem to see why.
Code below
Anyone else seen this?
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/
libs/jquery/1.3/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/
jquery-ui.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/
jqueryui/1.7.1/themes/ui-lightness/jquery-ui.css" type="text/css"
media="screen" />
<script type="text/javascript" src="stateSwitcher.js"></script>
<script>
$('document').ready(function(){
$('body').stateSwitcher();
$("#slidingPanel").slideOut();
$("#startdate").datepicker();
$("#enddate").datepicker();
});
(function($) { //only available to JQuery
$.fn.stateSwitcher=function()
{
$('.altState').hide();
$(this).after('<span id="stateControl">Switch State</span>');
$('#stateControl').live("click",function(){
//Switch all elements on the page that have a equivalent hidden
element
// dictated
$('.altState').css('display','');
$('.alt').hide();
$('.altState').show();
});
$('#stateControl').live("dblclick",function(){
//Switch all elements on the page that have a equivalent hidden
element
// dictated
$('.alt').show();
$('.altState').hide();
});
return false;
}
})(jQuery);
(function($) {
$.fn.slideOut=function(options)
{
var me=this;
var settings = $.extend({
trigger:'click',target:'.'+ me.attr("id"),speed:'slow'
});
if(options)
{
$.extend(settings, options);
}
$(settings.target).css("display","none");
me.bind(settings.trigger,toggleElement);
function toggleElement()
{
var target=settings.target;
$(target).toggle();
if(!me.hasClass("open"))
{
me.addClass("open");
}
else
{
me.removeClass("open");
$(target).css("display","none");
}
return false;
}
return false;
}
})(jQuery);