Answers for "js dom for mobile"

0

js dom for mobile

// If the screen is wide enough that we want 3 columns
  if($(window).width() >= 770)
  {
  // Create the indent
  $("#front_items").css(
  {
  'margin-top': '-5px',
  'margin-left': '20px'
  });
  
  // Size the columns
  var textWidth = ($("#carousel").width() - 70) / 3;
  $(".front_column").css(
  {
  'width': textWidth + 'px',
  'margin-bottom': '0'
  });
  }
  // One column interface
  else
  {
  $("#front_items").css(
  {
  'margin-top': '0',
  'margin-left': '0'
  });
  
  textWidth = $("#carousel").width() + 20;
  $(".front_column").css(
  {
  'width': textWidth + 'px',
  'margin-bottom': '5px'
  });
  }
Posted by: Guest on September-22-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language