Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- jQuery(function($){
- /*======================================================================*\
- Columns
- \*======================================================================*/
- // cache ColumnLength
- var columnLength = $('input[name="ColumnLength"]');
- // Onload check the value of ColumnLength
- showHideColumns(columnLength.val());
- // When ColumnLength is changed run showHideColumns
- columnLength.change(function(){
- var $val = $(this).val();
- showHideColumns($val);
- });
- // Show/Hide columns based on ColumnLength
- function showHideColumns(e){
- switch(e){
- case '2':
- $('#ColumnThree, #ColumnFour').hide();
- break;
- case '3':
- $('#ColumnThree').show();
- $('#ColumnFour').hide();
- break;
- case '4':
- $('#ColumnThree, #ColumnFour').show();
- break;
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement