Consider following HTML snippet:

    <input type="button" value="Button 1" />
    <input type="button" value="Button 2" />
    <input type="button" value="Button 3" />
and jQuery code snippet:

        $(document).ready(function() {
            $("[type='button']").each(function(i) {
                for (var j = 0; j < i; j++) {
                    $(this).click(function() {
What will happend after clicking on button3?
We will have two buttons after the page loading - slideToggle() will hide button2. On click at button3 the allert box will show the value of button3 two times.

Следи за CodeGalaxy

Мобильное приложение Beta

Get it on Google Play
Обратная Связь
Зарегистрируйся сейчас
или Подпишись на будущие тесты