javascript hide / show


SUBMITTED BY: Guest

DATE: Jan. 20, 2014, 12:15 p.m.

FORMAT: Text only

SIZE: 2.3 kB

HITS: 717

  1. var carouselinterval;
  2. var carouseldelay;
  3. (function( window, undefined ) {
  4. var nah = {
  5. callback: {
  6. showForm: function(){
  7. jQuery('#buttons-keeper').find('.reveal').slideDown();
  8. jQuery('#callbackheader_response').html('');
  9. jQuery('#callbackheader_status').html('');
  10. },
  11. hideForm: function(){
  12. jQuery('#buttons-keeper').find('.reveal').slideUp();
  13. jQuery('#callbackheader_form').validationEngine('hide');
  14. }
  15. }
  16. }
  17. };
  18. window.nah = nah;
  19. })(window);
  20. jQuery(document).ready(function(){
  21. //jQuery('body').removeClass('no-js');
  22. if(jQuery('.datepicker').length > 0){
  23. jQuery('.datepicker').datepicker();
  24. }
  25. //generic field value clearer
  26. jQuery('.textfield').focus(function(){
  27. if(jQuery(this).val() == jQuery(this).attr('title')){
  28. jQuery(this).val('');
  29. }
  30. }).blur(function(){
  31. if(jQuery(this).val() == ''){
  32. var mm = jQuery(this).attr('title');
  33. jQuery(this).val(mm);
  34. }
  35. });
  36. //make sure we don't submit the default values with form submissions
  37. jQuery('form').submit(function(){
  38. jQuery(this).find('.text').each(function(){
  39. if(jQuery(this).val() == jQuery(this).attr('title')){
  40. jQuery(this).val('');
  41. }
  42. });
  43. });
  44. // HTML5 placeholder version
  45. //jQuery('input, textarea').placeholder();
  46. /* callback box expand/collapse */
  47. jQuery('#id_phone_1').click(function(){
  48. nah.callback.showForm();
  49. });
  50. jQuery('#callbackcancel').click(function(){
  51. nah.callback.hideForm();
  52. return false;
  53. });
  54. jQuery('#footer_phone_1').focus(function(){
  55. nah.btmcallback.showForm();
  56. });
  57. jQuery('#footerCancelButton').click(function(){
  58. nah.btmcallback.hideForm();
  59. return false;
  60. });
  61. /* claims process page */
  62. jQuery('.stepclaim .title').click(function(){
  63. nah.claimsprocess.toggle(jQuery(this));
  64. });
  65. });

comments powered by Disqus