Browse Source

Adds div hide to show_more()

1) third arguement will hide div on click or submit
2) another user enhancement
devel
Jonathan Rosenbaum 10 years ago
parent
commit
dacb562b82
  1. 13
      js/contact.js

13
js/contact.js

@ -155,10 +155,11 @@ $(function(){
// show more button // show more button
function show_more(demo,demo_button) { function show_more(demo,demo_button,div_click) {
$(demo).hide(); $(demo).hide();
var c=0; var c=0;
var button_value = demo_button.val(); var button_value = demo_button.val();
// button
$(demo_button).click(function(e){ $(demo_button).click(function(e){
e.preventDefault(); e.preventDefault();
if (c == 0) { if (c == 0) {
@ -171,9 +172,17 @@ $(function(){
c--; c--;
} }
} ); } );
// div
if (div_click) {
$(div_click).on("click submit", function(e){
$(this).hide();
$(demo_button).attr("value",button_value);
c = 0;
} );
}
} }
show_more($('#waiver'),$('#waiver_button')); show_more($('#waiver'),$('#waiver_button'),$('#waiver'));
show_more($('#interest_form'),$('#interest_form_button')); show_more($('#interest_form'),$('#interest_form_button'));
$("#email_list_toggle").on("set",function() { $("#email_list_toggle").on("set",function() {

Loading…
Cancel
Save