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 9210647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T01:07:35+00:00 2026-06-18T01:07:35+00:00

A site I’m working on was built using jQuery v1.8.3. I’m attempting to upgrade

  • 0

A site I’m working on was built using jQuery v1.8.3. I’m attempting to upgrade to v1.9.0. Using the jQuery Migration plug-in (v.1.0.0), I’m getting messages in the console saying .attr() is deprecated.

In the .js file these two lines are being used:

var branchID = $('select#ddlBranches').attr('value');
$('select#ddlBranches').attr('value', branchID).change();

They’re intended to get the value (which is a record ID) of the current selection in the dropdown, and fire the change event on the dropdown, setting it to the indicated value.

The first line results in this message in the console: “property-based jQuery.fn.attr(‘value’) is deprecated“

The second line causes this to show in the console: “property-based jQuery.fn.attr(‘value’, val) is deprecated“

The Upgrade guide discusses .attr(), but I don’t see anywhere that mentions what to replace it with.

What am I supposed to replace .attr() with to accomplish the same functionality?

Thanks for anyone’s help.

  • 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-18T01:07:36+00:00Added an answer on June 18, 2026 at 1:07 am

    If you want to get/set the value, use the .val() function:

    var branchID = $('select#ddlBranches').val();
    $('select#ddlBranches').val(branchID).change();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The site I'm working on is using the Frontpage module to redirect anon users
A site I'm working on has Flash headers (using swfobject to embed them). Now
Site in question: http://www.sedulity.tk/ Site using Chrome 19 dev: Site using IE9: as you
The site I'm currently working on has a series of videos on a carousel
My site, which is built on Python/Postgresql with django, has an area where you
Site in question: http://mtthwbsh.com For my mobile nav I am using the following script
Site is Located @ beattrainsoundsystem.com/home I'm using serialScroll to animate a number of divs
Site's at http://cocktail.juggernautwebsites.com/ and I'm working in the footer. I'm trying to scroll the
The site I'm maintaining has been designed pretty rigidly using pixels for font sizes,
The site I am working on wants to generate its own shortened URLs rather

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.