c# - Dropdown with image and text together in Asp.net 3.5 and jquery -


I have been given a task to create a dynamic drop down that takes it from the table [image and value id] I am thinking that none of you has come into this scenario or if someone can help me in this, then I need help in concept and coding. I am definitely appreciated for any help that I see Here is an example link in Jackie:

Something like that Data coming from the table.

If you use plug-ins found in the link, what you want to do basically Dynamically create a dropdown based on table content. Without much information about how your desk is composed, I can not give you exact details, but something like that should stop you (I think there is already a drop-down element on the page that is called " Select ", and your table is called" table "with image in field 0, and text in field 1) Note: this has not actually been tested.

  var option = ""; $ ("# Table tr"). Each (function () {var imagePath = $ (this) .find ("td: eq (0) img"). Attr ("src"); var title = $ (this) ("Td: eq (1)" ). Text (); Option + = '& lt; Option Value = "' + + Title + '" Title = "' + + ImagePath + '" & gt;' + Title + '& lt; / option & gt; ';}); $ ("Select #") HTML (option).  

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -