Im trying to handle a click event on a `div`.There are 2 separate click events that I need to handle on `div`, one is on element `<a>` and another on element `<span>` I have a psedo code for the if-else conditions depending on what element I have clicked.
below is my function after rendering the page:

afterrender: function() {
                          tag: 'div',
                          html: "<label class='highlight'> Try the new <a href='#'>Beta version</a><span class='icon-clear'></span></label>"
                      }).on("click", function(e) {
                        if ( is <a>) {
                          //do some fun
                        }else if ( is <span>) {
                            //do some func
                    }, this, { delegate: 'label' });  
I'm not sure how to check which element was clicked to execute fun depending on that element..Any ideas??