mirror of
				https://github.com/fspc/Yellow-Bike-Database.git
				synced 2025-11-03 17:05:35 -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:
		
							parent
							
								
									878f6857e0
								
							
						
					
					
						commit
						dacb562b82
					
				@ -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) {
 | 
				
			||||||
@ -170,10 +171,18 @@ $(function(){
 | 
				
			|||||||
		   	$(this).attr("value",button_value);
 | 
							   	$(this).attr("value",button_value);
 | 
				
			||||||
		    	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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user