Kod
$( document ).ready(function() {
var keyboard=0;
$(".keyboard_button").click(function(){
alert(keyboard);
keyboard=1;
alert(keyboard);
});
});
if(keyboard==1){
$(function(){
$('textarea, input').keyboard({
layout: 'polish-qwerty',
});
});
}
var keyboard=0;
$(".keyboard_button").click(function(){
alert(keyboard);
keyboard=1;
alert(keyboard);
});
});
if(keyboard==1){
$(function(){
$('textarea, input').keyboard({
layout: 'polish-qwerty',
});
});
}
edit:
troche to zmodyfikowałem już prawie działa, ale nie mam pojęcia jak deaktywować funkcje na tych polach, narazie obejście robie, że odświeżam strone...
Kod
$( document ).ready(function() {
console.log( "ready!" );
var keyboard=0;
$(".keyboard_button").click(function(){
if(keyboard==0){
keyboard=1
$('textarea, input').keyboard({
layout: 'polish-qwerty',
});
}
else{
console.log( "else" );
location.reload();
}
});
});
console.log( "ready!" );
var keyboard=0;
$(".keyboard_button").click(function(){
if(keyboard==0){
keyboard=1
$('textarea, input').keyboard({
layout: 'polish-qwerty',
});
}
else{
console.log( "else" );
location.reload();
}
});
});