A
A
Alexey Dugnist2015-12-09 21:28:18
JavaScript
Alexey Dugnist, 2015-12-09 21:28:18

Why does on change only fire once?

if res.code is '300'
    $( "#main" ).load "profile.html"
else
    $( "#main" ).load "signin.html"


Buttons with identifiers signingo and signoutgo are in different upload files.

$( document ).on "change", ".signin", () ->
    console.log 'in'

$( document ).on "change", ".profile", () ->
    console.log 'out'


The first time everything is fine, the second time it doesn't work...

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question