I am using jquery, backbonejs and underscorejs for my project. I want to upload image using ajaxForm and document.ready(). On productImageView.js I have

```
define(['jquery', 'underscore', 'backbone', 'text!templates/product/productImageTemplate.html'], function($, _, Backbone, productImageTemplate) {
var ProductImageView = Backbone.View.extend({
    el: $("#page"),
    initialize: function() {
        this.$el.off();
    },
    render: function() {
        $(function() {
            $('#myForm').ajaxForm(function() {
                alert("Image uploaded");
            });
        });
        this.$el.html(productImageTemplate);
    }
});
return ProductImageView;
});

```

On productImageTemplate.html is

```
<form id="myForm" action="upload_image.php" method="post"> 
<input name="uploadfile" type="file" />
<input type="submit" id="uploadButton" value="Upload" /> 

```

For the first time I upload the image, everything is ok. But when the second time I visit the page and upload, the `document.ready()` not working.

Thanks a lot in advance.

Resource: <http://malsup.com/jquery/form/>