How to realize jQuery cascading menu
This article mainly explains "how to achieve the jQuery cascading menu", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "how to achieve the jQuery cascading menu" bar!
Cascading style sheets:
.button {border: 1px ridge # ffffff; line-height:18px; height: 20px; width: 45px; padding-top: 0px; background:#CBDAF7; color:#000000; font-size: 9pt;}
HTML body:
Option 1 option 2 option 3 option 4 option 5 option 6
Javascript operation code:
$(document) .ready (function () {$("# add") .click (function () {$("# first option:selected"). AppendTo ($("# second")); $("# add_all") .click (function () {$("# first option"). AppendTo ($("# second"));}); $("# remove") .click (function () {$("# second option:selected"). AppendTo ($("# first"));}) $("# remove_all") .click (function () {$("# second option") .appendTo ($("# first"));})
Effect:
Thank you for your reading, the above is the content of "how to achieve jQuery cascade menu", after the study of this article, I believe you have a deeper understanding of how to achieve jQuery cascade menu, the specific use of the situation also needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!