Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

... (three dots) in jQuery?

I was looking at the documentation page for jScroll plugin for jQuery (http://demos.flesler.com/jquery/scrollTo) and I noticed this :

$(...).scrollTo( $('ul').get(2).childNodes[20], 800 );

So, what does the three dots in jQuery mean ? I have never seen this selector before

EDIT :

DOM Element

This is from the source HTML. Viewing the source for the following links :

Relative 
selectorjQuery 
objectDOM 
ElementAbsolute 
numberAbsolute

all give the same implementation.

EDIT : I didnt look at the attribute clearly, its for the title attribute. I assumed its the href attribute. Feel silly asking this question now :) Thanks for the answers

like image 452
YD8877 Avatar asked Feb 10 '12 12:02

YD8877


2 Answers

I am fairly certain that he was using that as an example.

$( ... ) would be akin to $( your-selector-here ).

In other words, I have never seen any implementation of that.

like image 94
Barry Chapman Avatar answered Oct 06 '22 13:10

Barry Chapman


Typically ... is used in various docs to shorten the example, and it means that you put something in place of the dots, or that what you would put there was omitted (to shorten the example)

It's not actually valid JS syntax.

like image 32
Jani Hartikainen Avatar answered Oct 06 '22 15:10

Jani Hartikainen