Jcarousellite error in jquery 1.2

Source: Internet
Author: User

Related Websites:
Www.jquery.com jquery Official Website
Http://jquery.com/plugins/project/jCarouselLiteJcarousellite plug-in

The plug-in author may not be updated for a long time. It seems that he uses Version 1.1.3. Now that jquery 1.2.1 is available, an error will occur.
I searched the internet and found no related upgrade.
You can only find the cause by yourself.
Thanks to FF's Js error prompt. It turns out that jquery's original. GT and. Lt methods are gone. To replace him.SliceMethod

Original. GtDescription

Reduces the Matching Element Set to all elements after the given position. The position of this element in the Matching Element Set is changed0And the length becomes1. 
Reduce the set of matched elements to all elements after a given position. The position of the element in the set of matched elements starts at 0 and goes to length-1.
[Example]:
$ ("P"). gt (0)
HtmlMark:
< P > This is just a test. </ P > < P > So is this </ P >
Result:
[ <P>So is this</P>]


Description of the original. Lt Method

Reduces the Matching Element Set to all elements before the given position. The position of this element in the Matching Element Set is changed to 0, and the length is changed to 1.
Reduce the set of matched elements to all elements before a given position. The position of the element in the set of matched elements starts at 0 and goes to length-1.
[Example]:
$ ("P"). LT (1)
HTML Tag:
< P > This is just a test. </ P > < P > So is this </ P >
Result:
[ < P > This is just a test. </ P > ]

Now his. Slice and array are replaced in the same way

Slice Method (array)
return a segment of an array.
arrayobj. Slice (START, [end])
parameter
arrayobj
required. An array object.
Start
required. The starting element of the part specified in arrayobj is the subscript calculated from scratch.
end
optional. The ending element of the part specified in arrayobj is the subscript calculated from scratch.
description
the slice method returns an array object, which contains the specified part of arrayobj.
the slice method is always copied to the element specified by end, but this element is not included. If start is negative, it is processed as Length + start. Here, length is the length of the array. If end is negative, it is processed as Length + end. Here, length is the length of the array. If end is omitted, the slice method will always be copied to the end of arrayobj. If end appears before start, no elements are copied to the new array.
example
In the following example, all elements in myarray are copied to newarray except the last element:
newarray = myarray. slice (0,-1)

That is to say. It turns out to be. gt (N). Now it is represented as. Slice (n + 1)
It turns out that. LT (n) is now represented as. Slice (0, n)

Change. GT and. Lt in Plug-In js to OK ..

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.