We often see grades, such as
There are several ways in which this effect
1. Using: LT (index)
/*$ (' DL '). each (function () {var ths = $ (this), $ (this). Find (' DD '). Click (function () {ths.find (' dd '). Removeclass (' Selected '); Ths.find (' Dd:lt (' + (This). Index () +1) + ') '). AddClass (' selected ');}). DblClick (function () {$ (this). Removeclass (' selected ');})}); */$ (' DD '). Click (function () {var num = $ (this). index (); $ (' DD '). Removeclass (' selected ');//Remove all Effects first $ (' Dd:lt (' + (num+1) + ') '). AddClass (' selected ');///Less than DD execution of this index}). DblClick (function () {//double-click (' DD '). Removeclass (' selected ');})
Combination of 2prevAll () and Nextall () methods
$ (function () {
$ ("DD"). Click (function () {$ (this). AddClass ("selected"), $ (this). Prevall (). addclass ("selected"); $ (this). Nextall () . Removeclass ("selected"); }); $ ("DD"). DblClick (function () {$ ("dd"). Removeclass ("selected");});
);
Rank and star ratings