Search the Community
Showing results for tags 'hide fields'.
-
Hi! I'm testing a JQuery script to hide/show divs and it's working successfuly, and I consider this approch very nice to hide/show fields, because it does not cause any problem with alignment of the fields! This solution as is requires we click in the respective weblink to show and hide the fields! But I need to make a little change, I would like to trigger this function when the corresponding checkbox is checked, e.g. when the checkbox "x" is checked show div "x", and when it is unchecked hide div "x"! The triggers to call this function would be the following: 1) "Ir para o Trabalho" checkbox instead "Show/hide_1" weblink! 2) "Ir para o Colégio/ Faculdade/ Pós Graduação" checkbox instead "Show/hide_2" weblink! Please, could someone help me set these triggers? My url page is: http://sa1.caspio.com/dp.asp?AppKey=58733000aac8a3fdae8b45deb24a The script I'm using is the following: <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function(){ $(".slidingDiv1").hide(); $(".show_hide1").show(); $('.show_hide1').click(function(){ $(".slidingDiv1").slideToggle(); }); }); </script> <script type="text/javascript"> $(document).ready(function(){ $(".slidingDiv2").hide(); $(".show_hide2").show(); $('.show_hide2').click(function(){ $(".slidingDiv2").slideToggle(); }); }); </script> Best! Luiz