js dom for mobile

Solutions on MaxInterview for js dom for mobile by the best coders in the world

showing results for - "js dom for mobile"
Ariana
25 Mar 2017
1// If the screen is wide enough that we want 3 columns
2  if($(window).width() >= 770)
3  {
4  // Create the indent
5  $("#front_items").css(
6  {
7  'margin-top': '-5px',
8  'margin-left': '20px'
9  });
10  
11  // Size the columns
12  var textWidth = ($("#carousel").width() - 70) / 3;
13  $(".front_column").css(
14  {
15  'width': textWidth + 'px',
16  'margin-bottom': '0'
17  });
18  }
19  // One column interface
20  else
21  {
22  $("#front_items").css(
23  {
24  'margin-top': '0',
25  'margin-left': '0'
26  });
27  
28  textWidth = $("#carousel").width() + 20;
29  $(".front_column").css(
30  {
31  'width': textWidth + 'px',
32  'margin-bottom': '5px'
33  });
34  }