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

    JQ turn $('#topspeed').change(function() into a condition

    I want to replace

    $('#topspeed').change(function(){
    with a condition, something like the following, but working

    if($("[id=topspeed]").is(":selected")){
    How to do it?

    Here's the HTML*




    <select id="topspeed" >
    <option data-icon="arrow-u" data-iconpos="top" >- SELECT -</option >
    </select>
    __________________________
    plum spams are coldly discouraged
    Last edited by eydg; 06-23-2013 at 06:12 AM.

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,629
    Thanks
    6
    Thanked 1,002 Times in 975 Posts
    I’m not sure what you’re trying to do.

  • #3
    New Coder
    Join Date
    Sep 2012
    Posts
    79
    Thanks
    2
    Thanked 1 Time in 1 Post
    Here is the answer:

    Code:
    $('select').change(function(){
    if($(this).is('#topspeed'))


  •  

    Posting Permissions

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