- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2014 09:21 PM
I have a dropdown list with three options - green, yellow, red. Each OPTION has it's own background color so when the user expands the list they see the actual color instead of the text. I was able to create the dropdown using an onLoad script, however, I haven't figured out how to get rid of that blue highlight on the dropdown! I'd like to just remove it all together so that on mouseover, all you see is the background color of the option instead of the blue. As it stands now, the blue replaces the background color of the option which kind of defeats the purpose of having it in the first place. Since this is on a form and not a UI page, I'm having issues referencing the jquery library. I've been trying to figure this out for a while and I feel like I'm going around in circles, so I'll take any help I can get!!! Thanks!!!
The following example works fine with a UI page but I can't get it to work on the form - Reinventing drop down with CSS and jQuery - demo
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2014 06:49 AM
Hi Jessica,
To use jquery in Client script you need to follow steps:
1) Mark UI script "jquery.min" or "jquery" library as Global.
2) Use "$j" instead of "jQuery" to call it.
You can check below site also:
http://jylertones.com/blog/2013/05/the-right-way-to-use-jquery-with-servicenow/
Please mark answer as correct/helpful, if it was really helpful
Regards,
Solutioner
Enhance Knowledge NOW@ www.solutioningnow.com
http://www.solutioningnow.com/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2014 06:49 AM
Hi Jessica,
To use jquery in Client script you need to follow steps:
1) Mark UI script "jquery.min" or "jquery" library as Global.
2) Use "$j" instead of "jQuery" to call it.
You can check below site also:
http://jylertones.com/blog/2013/05/the-right-way-to-use-jquery-with-servicenow/
Please mark answer as correct/helpful, if it was really helpful
Regards,
Solutioner
Enhance Knowledge NOW@ www.solutioningnow.com
http://www.solutioningnow.com/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2014 07:33 AM
Thanks for your reply. Do you know if it's best practice to use a variable other than $j to avoid any issues with the version?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2014 07:37 AM
Yeah that's the best practice to use a variable other than $j
and other than $
. You can call it $j_custom
, you can call it.
var $j_custom = jQuery.noConflict(true)
Please mark answer as correct/helpful, if it was really helpful
Regards,
Solutioner
Enhance Knowledge NOW@ www.solutioningnow.com
http://www.solutioningnow.com/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2014 07:43 AM
Thanks for your help!