Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4613828
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:36:34+00:00 2026-05-22T01:36:34+00:00

I am using following Jscript to show 24 hours format of time FromTime and

  • 0

I am using following Jscript to show 24 hours format of time FromTime and ToTime

Almost it is working fine, but have some issues as it is not appending all the values from first dropdown and some times for some value i select in first dropdown the sort order or the immd time is not on the top

Please help me on this.

Thanks in advance.

<select id="one">
     <option value="1">1:00</option>
    <option value="2">1:30</option>
    <option value="3">2:00</option>
    <option value="4">2:30</option>
    <option value="5">3:00</option>
    <option value="6">3:30</option>
    <option value="7">4:00</option>
    <option value="8">4:30</option>
    <option value="9">5:00</option>
    <option value="10">5:30</option>
    <option value="11">6:00</option>
    <option value="12">6:30</option>
    <option value="13">7:00</option>
    <option value="14">7:30</option>
    <option value="15">8:00</option>
    <option value="16">8:30</option>
    <option value="17">9:00</option>
    <option value="18">9:30</option>
    <option value="19">10:00</option>
    <option value="20">10:30</option>
    <option value="21">11:00</option>
    <option value="22">11:30</option>
    <option value="23">12:00</option>
    <option value="24">12:30</option>
    <option value="25">13:00</option>
    <option value="26">13:30</option>
    <option value="27">14:00</option>
    <option value="28">14:30</option>
    <option value="29">15:00</option>
    <option value="30">15:30</option>
    <option value="31">16:00</option>
    <option value="32">16:30</option>
    <option value="33">17:00</option>
    <option value="34">17:30</option>
    <option value="35">18:00</option>
    <option value="36">18:30</option>
    <option value="37">19:00</option>
    <option value="38">19:30</option>
    <option value="39">20:00</option>
    <option value="40">20:30</option>
    <option value="41">21:00</option>
    <option value="42">21:30</option>
    <option value="43">22:00</option>
    <option value="44">22:30</option>
    <option value="45">23:00</option>
    <option value="46">23:30</option>
    <option value="47">00:00</option>
    <option value="48">00:30</option>

  </select>

    <select id="two"></select>

    <script type="text/javascript">
        $(function () {
            $("#one").change(function (e) {
                $("#two").empty();

                var options = 
                $("#one option").filter(function(e){
                    return $(this).attr("value") > $("#one option:selected").val();
                }).clone();

                $("#two").append(options);
            });
        });
    </script>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T01:36:35+00:00Added an answer on May 22, 2026 at 1:36 am

    Your numbers are being compared as strings, simply parse them to int and then compare:

    return parseInt($(this).attr("value"),10) > parseInt($("#one option:selected").val(),10);
    

    http://jsfiddle.net/XMq2T/1/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using following code to remove some specific nodes from xml file..It show
I'm having problems using ajax with jQuery... I have the following jscript: $(document).ready(function() {
I am using following code to append param to url. This is working fine
I am using following class to show a grid like appearance with pagination on
hi i have the following page: [here][link removed] the script i wrote is working
I'm Using following code in flex4 mxml That works fine. <mx:Button label=Set focus to
Using following console application i am converting each string to uppercase letters. But string
I am trying to hide/show elements in a view using following code: $('buttonClass/IDhere').click(function (){
Using following code I try to get updated list of checkbuttons' corresponding text values,
I using following code: var search = 'test'; if ($('#sku').find(search) ){ //alert(search); $(document).find(search).css('color','red'); <TABLE>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.