mulit selector with on click and change
hey guys im trying to get two different selectors with different events to execute the same code...is this possible or do i have to duplicate code?...thank you
- $('.input-file').on('click', function() {
- {);
- $('#uploaded-images').on('click', '#remove', function(event){
- });
-
- // these two functions to execute
-
- if (uploads === 0)
{
$('#image-status').text("Add up to " + max_uploads + " images.");
}
else if (uploads === 1)
{
$('#image-status').text(uploads + " Image selected. Add up to " + (max_uploads - uploads) + " more.");
}
else if (uploads > 1)
{
$('#image-status').text(uploads + " Images selected. Add up to " + (max_uploads - uploads) + " more.");
}