Класс javascript toggle не работает?
95
8
$('.form-control').on('focus blur', function (e) {
$(this).parents('.form-group').toggleClass('focused', (e.type === 'focus' || this.value.length > 0));
}).trigger('blur');
$('#moveleft').click(function () {
$('#textbox').animate({
'marginLeft': "0" //moves left
});
$('.toplam').animate({
'marginLeft': "100%" //moves right
});
});
$('#moveright').click(function () {
$('#textbox').animate({
'marginLeft': "50%" //moves right
});
$('.toplam').animate({
'marginLeft': "0" //moves right
});
});
спросил(а)
2016-10-22T09:48:00+03:00
4 года, 4 месяца назад
добавить комментарий
пожаловаться
Решение
85
Вы пытаетесь подключиться к событию "размытие фокуса", которого не существует.
Это либо .on("focus", function(e) { });
или это .on("blur", function(e) { } );
ответил(а)
2016-10-22T10:04:00+03:00
4 года, 4 месяца назад
добавить комментарий
пожаловаться
Ваш ответ
- Вопросы
- Buttonclick
- Класс javascript toggle не работает?