1
0
mirror of https://github.com/fspc/Yellow-Bike-Database.git synced 2025-02-22 17:03:22 -05:00

Adds div hide to show_more()

1) third arguement will hide div on click or submit
2) another user enhancement
This commit is contained in:
Jonathan Rosenbaum 2015-04-05 18:47:16 +00:00
parent 878f6857e0
commit dacb562b82

View File

@ -155,10 +155,11 @@ $(function(){
// show more button
function show_more(demo,demo_button) {
function show_more(demo,demo_button,div_click) {
$(demo).hide();
var c=0;
var button_value = demo_button.val();
// button
$(demo_button).click(function(e){
e.preventDefault();
if (c == 0) {
@ -170,10 +171,18 @@ $(function(){
$(this).attr("value",button_value);
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'));
$("#email_list_toggle").on("set",function() {