Avatar of b24
b24

asked on 

Adapt jQuery Selectbox plugin to add extra class to select list

Hi All,

I'm using a jQuery Selectbox plugin from the following location: http://www.bulgaria-web-developers.com/projects/javascript/selectbox/

It works fine except that I would like to be able to add a class to either the <a> link  or <li> that has been chosen by the user so when the dropdown is opened again, I can have styled that <li> to look like the active selection.

So when the user clicks on a list option, either the <a> or <li> get an additional class of 'selected' or whatever which is then removed when you click on another option.

Any ideas?

Many thanks.
jquery.selectbox-0.2.zip
JavaScriptjQueryCSS

Avatar of undefined
Last Comment
Kyle Hamilton
Avatar of COBOLdinosaur
COBOLdinosaur
Flag of Canada image

Like most "free" plugins, there does not appear to be any support.  I suggest you try to contact the author, because I doubt anyone is going to try and modify the library for you.

Cd&
ASKER CERTIFIED SOLUTION
Avatar of Kyle Hamilton
Kyle Hamilton
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of b24
b24

ASKER

Thanks kozaiwaniec !
my pleasure :))
JavaScript
JavaScript

JavaScript is a dynamic, object-based language commonly used for client-side scripting in web browsers. Recently, server side JavaScript frameworks have also emerged. JavaScript runs on nearly every operating system and in almost every mainstream web browser.

127K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo