I've a very peculiar problem, and I cannot get hold of it. Trailing slash on my input elements disappeared, though I'm sure (double checked) php does contain them. Something happens when jquery appends this data to html tree.
Problem can be seen here: http://gamoicani.es/logo/ if you click on logo and see input html, you will see that there is no trailing slash at the end.
But in php I've this:
<input type="text" name="guesslogo" data-lang="<?php echo $row['logo_lang']; ?>" />
I even tried <input></input>
but result is the same.
I also disabled knob and kbd jquery plugins on these inputs but something is not right and it simply doesn't work.
I checked my ajax call:
function create_views(level) {
$.ajax({
url: "actions.php",
type: "GET",
data: "show_level=" + level,
cache: false,
success: function (data){
views[level] = '<li data-level="' + level + '">' + data + '</li>';
//Count completed tasks
completed_calls++;
//if last level is loaded-called append and activate slider
if (levels == completed_calls) {
//append views to container
console.dir($(".slides_container").append(views.join(' ')));
//activate slider
unislider = $(".slides_container").dpUniSlider({
//loop: false,
draggable: false
});
//Activate Georgian keyboard for some logos
$("input[data-lang=ge]").GeoKBD();
//Activate progress bar
update_level_progress_bar();
}
}
});
}
Did console.dir on views and / is there! So it must be during append something goes wrong... I'm running out of ideas to check...
Why do I care about trailing slash?
on.keypress only works for first input in html
//check answer on ENTER keyboard press
$("body").on("keypress", "input:text[name=guesslogo]", function(e){
if (e.keyCode == 13) {
$(this).siblings(".check").trigger("click");
}
});
This doesn't work correctly!
Any help appreciated!