Link to home
Start Free TrialLog in
Avatar of kgp43
kgp43Flag for Denmark

asked on

How to add div.slideUp to my current Ajax/jQuery?

Hi,

I got this jQuery/Ajax:

<script>

	$(document).ready(function() {
		$('#mount_tube_button').click(function(){
			$.ajax({
			
				url: 'conf_overview_handler.php',
				type: 'post',
				data: {'<?php echo $input_name; ?>':$('input[name=<?php echo $input_name; ?>]:checked').val()},
				success: function(msg){
					$('#mount_<?php echo $location; ?>_AJAX').html(msg);
				}
			
			}); // Ajax call
		}); //event handler
	}); //document.ready

</script>

Open in new window


How can I add this to it:
$( "#toggle_rod" ).slideUp( "slow" );

Open in new window


I have tried this, but it does not work:
<script>

	$(document).ready(function() {
		$('#mount_tube_button').click(function(){
			$.ajax({
			
				url: 'conf_overview_handler.php',
				type: 'post',
				data: {'<?php echo $input_name; ?>':$('input[name=<?php echo $input_name; ?>]:checked').val()},
				success: function(msg){
					$('#mount_<?php echo $location; ?>_AJAX').html(msg);
					$( "#toggle_rod" ).slideUp( "slow" );
				}
			
			}); // Ajax call
		}); //event handler
	}); //document.ready

</script>

Open in new window

Avatar of Nathan Riley
Nathan Riley
Flag of United States of America image

Should the slide only happen on the ajax success or should it slide on click?
ASKER CERTIFIED SOLUTION
Avatar of Nathan Riley
Nathan Riley
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial