Click here to Skip to main content
15,885,651 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: Invalid characters Pin
Shameel23-Jul-11 23:49
professionalShameel23-Jul-11 23:49 
QuestionRe: Invalid characters Pin
Tauseef A25-Jul-11 9:30
Tauseef A25-Jul-11 9:30 
AnswerRe: Invalid characters Pin
Shameel25-Jul-11 17:39
professionalShameel25-Jul-11 17:39 
Questionleap year program Pin
aman kaur22-Jul-11 18:47
aman kaur22-Jul-11 18:47 
AnswerRe: leap year program Pin
Richard MacCutchan22-Jul-11 23:11
mveRichard MacCutchan22-Jul-11 23:11 
AnswerRe: leap year program Pin
DaveAuld24-Jul-11 1:50
professionalDaveAuld24-Jul-11 1:50 
GeneralRe: leap year program Pin
Richard MacCutchan24-Jul-11 3:54
mveRichard MacCutchan24-Jul-11 3:54 
QuestionJQuery code snippet interpretation Pin
shpid3r21-Jul-11 9:40
shpid3r21-Jul-11 9:40 
Hey guys!

I have a div in a page called h-accordion.
After this div, there is a second one. When I pres on the first one, the second one toggles (hidden/shown).

The whole set repeats itself several times in the page - there are multiple "sections" which the user can "open" one by one.

I have the following code to make it work:
$('.h-accordion').click(function(){	<!--on click on this element-->
  if($(this).next().is(':hidden')){	<!--if the next element of the title is hidden-->

     $(this).next().slideDown();	<!--peform the slide down-->
     $(this).attr('rel',"opened");	<!--change the state to openened -->
  } else {		                <!--if the next element of the title is not hidden-->
     $(this).next().slideUp();		<!--perform the slide up-->
     $(this).attr('rel',"closed");	<!--change the state to closed -->
}
return false;
}).css('cursor', 'pointer').next().hide();


Could you please tell me what the last line does? Can`t figure it out with the jQuery reference...
Many thanks!
Shpid3r
AnswerRe: JQuery code snippet interpretation Pin
AspDotNetDev21-Jul-11 9:52
protectorAspDotNetDev21-Jul-11 9:52 
GeneralRe: JQuery code snippet interpretation Pin
shpid3r21-Jul-11 9:57
shpid3r21-Jul-11 9:57 
Questionhow to fire multiple textbox in javascript Pin
ghantaanil20-Jul-11 2:59
ghantaanil20-Jul-11 2:59 
AnswerRe: how to fire multiple textbox in javascript Pin
Not Active20-Jul-11 7:50
mentorNot Active20-Jul-11 7:50 
QuestionRe: how to fire multiple textbox in javascript Pin
Shameel23-Jul-11 23:53
professionalShameel23-Jul-11 23:53 
QuestionIdea [modified] Pin
Fazel063120-Jul-11 1:44
Fazel063120-Jul-11 1:44 
AnswerRe: Idea Pin
Richard MacCutchan20-Jul-11 2:36
mveRichard MacCutchan20-Jul-11 2:36 
QuestionComparing a list of word against a line Pin
nitin_ion18-Jul-11 18:45
nitin_ion18-Jul-11 18:45 
AnswerRe: Comparing a list of word against a line Pin
lorenkins24-Jul-11 4:12
lorenkins24-Jul-11 4:12 
QuestionHow to get file size without using ActiveX Pin
Sudhanshu Mani Tripathi14-Jul-11 0:14
Sudhanshu Mani Tripathi14-Jul-11 0:14 
AnswerRe: How to get file size without using ActiveX Pin
Pete O'Hanlon14-Jul-11 0:28
mvePete O'Hanlon14-Jul-11 0:28 
QuestionHow to change the "src" value in a <embed> using javascript function ? Pin
LockedOut13-Jul-11 7:28
LockedOut13-Jul-11 7:28 
AnswerRe: How to change the "src" value in a using javascript function ? Pin
csharpbd13-Jul-11 9:28
professionalcsharpbd13-Jul-11 9:28 
GeneralRe: How to change the "src" value in a using javascript function ? Pin
LockedOut13-Jul-11 15:04
LockedOut13-Jul-11 15:04 
AnswerRe: How to change the "src" value in a using javascript function ? Pin
twseitex15-Jul-11 9:04
twseitex15-Jul-11 9:04 
GeneralRe: How to change the "src" value in a using javascript function ? Pin
cjoki18-Jul-11 10:57
cjoki18-Jul-11 10:57 
Questionjavascript html xml Pin
Bala811-Jul-11 22:05
Bala811-Jul-11 22:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.