www.webdeveloper.com
Results 1 to 3 of 3

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

Hybrid View

  1. #1
    Join Date
    Sep 2012
    Posts
    3

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

    I want to replace

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

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


    Here's the HTML

    <select id="topspeed" >
    <option data-icon="arrow-u" data-iconpos="top" >- SELECT -</option >
    </select>

  2. #2
    Join Date
    May 2006
    Location
    Somewhere behind your screen
    Posts
    1,636
    Code:
    $('select').change(function(){
    if($(this).is('#topspeed')){bla-bla-bla}
    else{bla-bla-bla}
    });
    xxx: Guess Buddhist riddle: "What is the sound of one hand clapping?"
    yyy: facepalm

  3. #3
    Join Date
    Sep 2012
    Posts
    3
    Works! Have been looking for it for several hours. Thank you.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles