I have this popup that holds 2 buttons to decline and accept the problem is I’m trying to style the buttons and still also trigger a JS event to close the popup ( its a modal ajax popup)
Problem is I have som lack of inspiration and ideas to get the below 3 elements combined together.
Some rails code:
// ACCEPT FORM
= form_tag(friend_path, :method => 'post', :remote => true) do
= hidden_field_tag :user_id, current_user.id
= submit_tag 'ACCEPT'
// DECLINE FORM
= form_tag(friend_path, :method => 'post', :remote => true) do
= hidden_field_tag :user_id, current_user.id
= submit_tag 'DECLINE'
//fbmodal.close ()
Anyone some ideas how I can have the buttons
-
styleable ( like with twitter bootstrap )
-
still send with ajax
-
trigger a JS event to close the popup?
Styleable buttons:
Your JS can then be something like: