Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Sep 2012
    Posts
    79
    Thanks
    2
    Thanked 1 Time in 1 Post

    append and instantly display a message to select option

    http://jsbin.com/azipok/2/edit

    this piece of code does the trick of clearing up the option list of select menu and adding a "test" message, but this message becomes visible only upon dropping down the select menu.

    is there a way to make this "test" message display and replace the "no modules..." text upon clicking the button?

  2. #2
    Senior Coder xelawho's Avatar
    Join Date
    Nov 2010
    Location
    Here
    Posts
    3,647
    Thanks
    58
    Thanked 662 Times in 657 Posts
    you can trigger the change event, after you have appended the option:
    Code:
    $('#moduleselect').trigger("change")
    is that what you meant?

  3. Users who have thanked xelawho for this post:

    eydg (02-08-2013)

  4. #3
    New Coder
    Join Date
    Sep 2012
    Posts
    79
    Thanks
    2
    Thanked 1 Time in 1 Post


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •