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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T07:40:49+00:00 2026-06-01T07:40:49+00:00

In one of my HTML page dynamically loading some file field while clicking a

  • 0

In one of my HTML page dynamically loading some file field while clicking a button like follows

$('#add').click(function(){


$('#files').append('<input type="file" class="myfile" name="myfile" />');


});

My question is how to “bind” newly added element to HTML page so that I can access like

$('.myfile').change(function(){
// Code Here
});

I am asking this because

$('.myfile').live('change',function(){
// Code here
});

not working in all browsers , expecially IE

Please help thanks

  • 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-01T07:40:50+00:00Added an answer on June 1, 2026 at 7:40 am

    You should use .on() when you are using jQuery 1.7+ or .delegate() if lower.

    http://jsperf.com/jquery-live-vs-delegate-vs-on

    P.S. What version of IE are we talking about, because .live() should work (although slow as shit).

    UPDATE

    Demo for.delegate(): http://jsfiddle.net/PeeHaa/zqbBX/
    Demo for .on(): http://jsfiddle.net/PeeHaa/ddJrs/

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

Sidebar

Related Questions

What I would like to do is add dynamically HTML input fields in one
I am building some basic HTML code for a CMS. One of the page-related
Suppose I have one html page with frames. The left frame is simply a
I had created one HTML page for my experiance. In this i had use
in my html page, I have the following: <div id=rub> Select at least one
I have one page website only using HTML, CSS and JavaScript. I want to
In HTML, you can send data from one page to another using a GET
This one is weird, I have a page that consists of a html table
Some information on A/B split-testing: http://startuplessonslearned.blogspot.com/2008/09/one-line-split-test-or-how-to-ab-all.html http://www.37signals.com/svn/posts/1525-writing-decisions-headline-tests-on-the-highrise-signup-page I could do this in a Rails
I've an html page which has many dynamically created input boxes. The number of

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.