oemript Posted May 10, 2019 Share Posted May 10, 2019 Referring to following coding, I would like to know on how to assign the number into here "nth-child(2)" based on following calculation: Current month is 1 for Jan, it return 3, which become $jQuery('.sewvbm > li:nth-child(3)').click() Current month is 2 for Feb, it return 6, which become $jQuery('.sewvbm > li:nth-child(6)').click() Current month is 3 for Mar, it return 6, which become $jQuery('.sewvbm > li:nth-child(6)').click() Current month is 4 for Apr, it return 6, which become $jQuery('.sewvbm > li:nth-child(6)').click() Current month is 5 for May, it return 9, which become $jQuery('.sewvbm > li:nth-child(9)').click() Current month is 6 for Jun, it return 9, which become $jQuery('.sewvbm > li:nth-child(9)').click() Current month is 7 for Jul, it return 9, which become $jQuery('.sewvbm > li:nth-child(9)').click() Current month is 8 for Aug, it return 12, which become $jQuery('.sewvbm > li:nth-child(12)').click() Current month is 9 for Sep, it return 12, which become $jQuery('.sewvbm > li:nth-child(12)').click() Current month is 10 for Oct, it return 12, which become $jQuery('.sewvbm > li:nth-child(12)').click() Current month is 11 for Nov, it return 3, which become $jQuery('.sewvbm > li:nth-child(3)').click() Current month is 12 for Dec, it return 3, which become $jQuery('.sewvbm > li:nth-child(3)').click() Does anyone have any suggestions? Thanks in advance for any suggestions $jQuery('.sewvbm > li:nth-child(2)').click() Link to comment Share on other sites More sharing options...
RTFC Posted May 10, 2019 Share Posted May 10, 2019 For $m=1 To 12 ConsoleWrite($m & @TAB & _MonthToValue($m) & @CRLF) Next Func _MonthToValue($mon) Return Mod((Int(($mon+1)/3)),4)+1 EndFunc oemript 1 My Contributions and Wrappers Spoiler BitMaskSudokuSolver BuildPartitionTable CodeCrypter CodeScanner DigitalDisplay Eigen4AutoIt FAT Suite HighMem MetaCodeFileLibrary OSgrid Pool RdRand SecondDesktop SimulatedAnnealing Xbase I/O Link to comment Share on other sites More sharing options...
oemript Posted May 10, 2019 Author Share Posted May 10, 2019 (edited) Thank you very much for suggestions (^v^) Edited May 10, 2019 by oemript Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now