Support elements added at a later time
Support elements added at a later time

Hi there,

I used the plugin for wordpress and it is awesome. It works like a charm. Thanks, saved me some time.

However, I had to make changes to connect.js in order to support the elements added at a later time. 
In my case, it was a popup login modal which simply uses the plugin's shortcode to show the social buttons.

click() is a direct binding, it won't get bound to elements added in the future.
on() is a delegated binding that supports descendant elements that are added to the document at a later time.
NickIvanter/wordpress-social-login,NickIvanter/wordpress-social-login,hubdotcom/wordpress-social-login,miled/wordpress-social-login,NickIvanter/wordpress-social-login,miled/wordpress-social-login,ftena/wordpress-social-login,miled/wordpress-social-login,ftena/wordpress-social-login,hubdotcom/wordpress-social-login,ftena/wordpress-social-login,hubdotcom/wordpress-social-login,sassafrastech/wordpress-social-login,hubdotcom/wordpress-social-login,NickIvanter/wordpress-social-login,sassafrastech/wordpress-social-login,sassafrastech/wordpress-social-login,ftena/wordpress-social-login,miled/wordpress-social-login,sassafrastech/wordpress-social-login