Im using the igUpload on a responsive site together with fastclick (https://github.com/ftlabs/fastclick) to eliminate the 300ms delay between a physical tap and the firing of a click event on mobile browsers.
click
The problem is that it wont work correctly with igstartupbrowsebutton. The click event is never fired correctly on iOs.
Im rendering the upload with
$.ig.loader('igUpload', function() {
$('#projectImage').igUpload({
mode: 'multiple',
css: {
"what_name_should_i_use_here": "needsclick" // Does not work
},
multipleFiles: true,
maxSimultaneousFilesUploads: 1,
maxUploadedFiles: 50,
autostartupload: true,
labelUploadButton: 'Submit photos',
controlId: 'projectImage',
progressUrl: '/IGUploadStatusHandler.ashx',
allowedExtensions: [ 'jpg', 'JPG', 'jpeg', 'JPEG' ]
});
<button id="projectImage_ibb" class="ui-igstartupbrowsebutton ui-button-text-only ui-button ui-igbutton ui-widget ui-widget-content ui-corner-all ui-state-default" title="Upload File" role="button" aria-disabled="false"><span class="ui-button-text" id="projectImage_ibb_lbl"><span class="glyphicon glyphicon-upload"></span> Submit photos</span></button>
The problem is that i need to add a custom class to browsebutton to prevent FastClick on the specific element. Eg:
<button id="projectImage_ibb" class="ui-igstartupbrowsebutton ui-button-text-only ui-button ui-igbutton ui-widget ui-widget-content ui-corner-all ui-state-default needsclick" title="Upload File" role="button" aria-disabled="false"><span class="ui-button-text" id="projectImage_ibb_lbl"><span class="glyphicon glyphicon-upload"></span> Submit photos</span></button>
Hello pytte wrote,
I created the following case CAS-154564-M4H1V3 and will update you trough it. You could see it in your account in the 'Support Activity' page.
Please let me know if you have any additional questions.
I did not get your example code to work properly.
The documentation you refer to does not correspond to your example.
I want to add a custom class called needsclick to my rendered control below.
I want the result to be:
I was not able to do that with you example.
$(
".mySelector"
).igUpload({
"startupBrowseButtonClasses"
:
"needsclick"
}
Thank you for posting in our community.
What I can suggest for achieving your requirement is setting the startupBrowseButtonClasses to your custom class as following:
//Initialize $(".selector").igUpload({ css: { "startupBrowseButtonClasses": "customClass" } });
//Initialize
".selector"
"customClass"
Please let me know if you need any further assistance with this matter.