I’ve been looking around and there’s really not much on how to make font previews (to show the text in the same font they’re selecting) in a dropdown list. Can anybody point me in the right direction? Thanks.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To offer an alternative to using only a
selectelement, that will allow for styling the font, and applying other css, while updating a traditionalselectelement for submission to the server/script:html:
jQuery:
JS Fiddle demo.
Notes:
lielements will be the same as the order of theoptionelements, since theoptionthat becomesselectedis chosen by index (of theli).References:
click().index().removeAttr().eq().attr().removeClass().addClass().