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

  • Home
  • SEARCH
  • 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 8629827
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:54:22+00:00 2026-06-12T08:54:22+00:00

I am working within miva system so lets just say its a nightmare. I

  • 0

I am working within miva system so lets just say its a nightmare. I have the following code that I have to work with

<select name="ShippingMethod">
<option value="mvfedexsoap:FEDEX_2_DAY">FedEx 2Day® ($15.91)</option>
<option value="mvfedexsoap:GROUND_HOME_DELIVERY">FedEx Home Delivery® ($13.36)</option>
<option value="mvfedexsoap:PRIORITY_OVERNIGHT">FedEx Priority Overnight® ($20.15)</option>
<option value="mvfedexsoap:STANDARD_OVERNIGHT">FedEx Standard Overnight® ($18.41)</option>
</select>

My only option within this store is to work with jquery. I am fairly new to jquery so I would appreciate any help you are willing to give me.

On page load I want it to select the cheapest option. The method I was thinking of was to somehow collect the text within the option parse out the price then compare and select the lowest value. If you have something that may help I thank you ahead of time.

  • 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-06-12T08:54:24+00:00Added an answer on June 12, 2026 at 8:54 am

    Try this jsFiddle example.

    var idx = 0;
    var lowest = 9999;
    $('select[name=ShippingMethod] option').each(function(i) {
        val = parseFloat($(this).text().split('$')[1]);
        if ( val < lowest) {
            idx = i;
            lowest = val;
        }
    });
    $('select[name=ShippingMethod] option:eq('+idx+')').prop('selected', true);
    

    ​Basically this loops through the option text values, splits them and parses them into floating points, then finds the lowest value and selects it.

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

Sidebar

Related Questions

I'm working within a platform that I do not have server side access to
I am working within a Ruby on Rails app. I have a loop that
I am currently working within the confines of sharepoint 2007 and have some code
I am working within an intranet environment. We have both a production and development
Attempting/struggling to get registration and sign-up working within an active admin project. I have
I have a third party library which I finally have working within my MonoTouch
When working within a class on its own fields and properties, I typically only
I have been working within another question on this site and have almost completed
I am working within the confines of a php based CMS like system, which
I'm working within a project that is part of an EAR where all the

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.