Click here to Skip to main content
15,891,002 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi there,
Can anyone explain me the meaning of this line in javascript?

var formStep = $('a.rtsLink.rtsSelected>span>span>span').text();
Posted

$(...) is usually related to JQuery. It takes as parameter a CSS selector, and returns a list with zero or more elements.
Taking the .text() should put in your variable the text of the first element; read on JQuery (plenty resources online) if you have to maintain JQuery code.

Hope this helps,
Pablo.
 
Share this answer
 
it will get text value from span which is specified at following hierarchy in your html code

1.Check for anchor tag(a0
2.Check element with class name(rtLink)
3.Check element with class name(rtsSelected)
4.Check span element in that
5.Check span element in that.
6.Check span elenent in that(now will return text value of this span).
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900