Archives from S:\ Drive
Good to keep around methinks
This commit is contained in:
1 parent
eadaf70b9e
commit
6dd63cc439
606 files changed
+50212
No files matched your search
@@ -0,0 +1,46 @@
|
||||
// This file includes some utilities for the input form
|
||||
|
||||
$(document).on('change', '.btn-file :file', function() {
|
||||
var input = $(this),
|
||||
numFiles = input.get(0).files ? input.get(0).files.length : 1,
|
||||
label = input.val().replace(/\\/g, '/').replace(/.*\//, '');
|
||||
input.trigger('fileselect', [numFiles, label]);
|
||||
});
|
||||
|
||||
$(document).ready( function() {
|
||||
$('.btn-file :file').on('fileselect', function(event, numFiles, label) {
|
||||
//console.log(numFiles);
|
||||
//console.log(label);
|
||||
$("#filename").html("Uploading: " + label);
|
||||
});
|
||||
});
|
||||
|
||||
// from view-source:http://www.skoolrox.com/COM330/SampleForm.html
|
||||
|
||||
$(function() {
|
||||
var allStates = { "states" : [
|
||||
{ "abbreviation" : "AK", "stateName" : "Alaska" },
|
||||
{ "abbreviation" : "AL", "stateName" : "Alabama" },
|
||||
{ "abbreviation" : "AR", "stateName" : "Arkansas" },
|
||||
{ "abbreviation" : "AZ", "stateName" : "Arizona" },
|
||||
{ "abbreviation" : "CA", "stateName" : "California" }
|
||||
]};
|
||||
|
||||
var listItem = $('#state');
|
||||
$(allStates.states).each(function(index, value) {
|
||||
$(listItem).append('<option value="' + value.abbreviation + '">' + value.stateName + '</option>');
|
||||
});
|
||||
|
||||
var numbers = ["London", "Tokyo", "New York", "Honolulu", "Sydney", "Paris",
|
||||
"Rome", "Barcelona", "Copenhagen"];
|
||||
var option = '';
|
||||
for (var i = 0; i < numbers.length; i++){
|
||||
option += '<option value="'+ numbers[i] + '">' + numbers[i] + '</option>';
|
||||
}
|
||||
$('#citiesToVisit').append(option);
|
||||
$('#citiesToVisit').attr({
|
||||
'multiple': 'multiple',
|
||||
'width': '200px',
|
||||
'height': '100px'
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user