#1
  1. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,664
    Rep Power
    171

    Onclick change class not working!


    In this page when I click on Paypal's check box it should show the paypal text but it doesn't!

    It shows the credit card ok but I cant figure out what I am doing wrong with the pay pal checkbox!

    Any help would be appreciated.

    Code:
    $(document).ready(function(){
    
    
    
    $("#payment_method_paypal").click(function() {
    		$('#paypal_box_nd').attr("class","paypal_nd");
    			}, function() {
    		$('#credit_card_box').attr("class","credit_card_nd_hidden");
    	});
    
    $("#payment_method_cc").click(function() {
    		$('#paypal_box_nd').attr("class","paypal_nd_hidden");
    			}, function() {
    		$('#credit_card_box').attr("class","credit_card_nd");
    	});
    
    });
    Thanks
  2. #2
  3. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,664
    Rep Power
    171
    Doesn't matter, replaced it with:
    Code:
    <!--Paypal Or Credit Card-->
    $(document).ready(function(){
    						   
    						   
    $("#payment_method_paypal").click(function() {	
    	
    	$('#paypal_box_nd').removeClass('paypal_nd_hidden');
    	$('#paypal_box_nd').addClass('paypal_nd');
    	$('#credit_card_box').removeClass('credit_card_nd');
    	$('#credit_card_box').addClass('credit_card_nd_hidden');
    });
    
    $("#payment_method_cc").click(function() {	
    	
    	$('#paypal_box_nd').addClass('paypal_nd_hidden');
    	$('#paypal_box_nd').removeClass('paypal_nd');
    	$('#credit_card_box').addClass('credit_card_nd');
    	$('#credit_card_box').removeClass('credit_card_nd_hidden');
    });
    
    });						   
    <!--Paypal Or Credit Card-->

IMN logo majestic logo threadwatch logo seochat tools logo