I have a PHP file where depending the icon clicked by the user a different registration form appears(different form for regular users and different for business users)
I intend providing for the regular users a facebook login feature…as such I have placed in that page JS code of the facebook SDK.
I want this code to be triggered only when the regular user registration form appears(after clicking the respective icon of course).
As is the case now the code is triggered when either of the forms appear…(something natural as the JS code is placed in that page).
Is there a way I can make the code run only when one of the forms is shown?
Maybe placing it somewhere else?