53 lines
1.0 KiB
JavaScript
53 lines
1.0 KiB
JavaScript
var schemacolor = "#fa8072";
|
|
|
|
$(document).ready(function(){
|
|
$("a").hover(function(){
|
|
$(this).css("color", schemacolor);
|
|
}, function(){
|
|
$(this).css("color", "black");
|
|
});
|
|
document.getElementById("jmeno").style.color = schemacolor;
|
|
$(document).on('change', '.btn-file :file', function() {
|
|
var input = $(this),
|
|
label = input.val().replace(/\\/g, '/').replace(/.*\//, '');
|
|
input.trigger('fileselect', [label]);
|
|
});
|
|
|
|
$('.btn-file :file').on('fileselect', function(event, label) {
|
|
|
|
var input = $(this).parents('.input-group').find(':text'),
|
|
log = label;
|
|
|
|
if( input.length ) {
|
|
input.val(log);
|
|
} else {
|
|
if( log ) alert(log);
|
|
}
|
|
|
|
});
|
|
$("#demo-editor-bootstrap").wysihtml5();
|
|
});
|
|
function readURL(input) {
|
|
if (input.files && input.files[0]) {
|
|
var reader = new FileReader();
|
|
|
|
reader.onload = function (e) {
|
|
$('#uvodni').attr('src', e.target.result);
|
|
console.log("Nahrano");
|
|
}
|
|
|
|
reader.readAsDataURL(input.files[0]);
|
|
}
|
|
}
|
|
|
|
function changeImage(){
|
|
$("#imgInp").change(function(){
|
|
readURL(this);
|
|
});
|
|
}
|
|
|
|
function changeText(){
|
|
|
|
}
|
|
|