daily pastebin goal
67%
SHARE
TWEET

Untitled

a guest Feb 18th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @foreach (var item in Model.TimeLines)
  2. {
  3.     <section id="timeline">
  4.         <article>
  5.             <div class="inner">
  6.                 <span class="date">
  7.                     <span class="day">@item.EventDate</span>
  8.                 </span>
  9.                 <h2>@item.Title</h2>
  10.                 <p>@item.Body</p>
  11.                 <div class="form-group row col-lg-12">
  12.                     @*<div class="button_cont row col-lg-6" align="center"><a asp-action="Edit" asp-controller="TimeLines" asp-route-id="@item.Id" class="example_c" noopener">Edit</a></div>*@
  13.                     <div class="button_cont row col-lg-6" align="center"><a asp-controller="TimeLines" asp-action="Delete" asp-route-id="@item.Id" style="cursor:pointer;" class="example_c" id="del">حذف</a></div>
  14.                     <div class="button_cont row col-lg-6" align="center"><a asp-controller="TimeLines" asp-action="Edit" asp-route-id="@item.Id" style="cursor:pointer;" class="example_c">تعديل</a></div>
  15.                 </div>
  16.             </div>
  17.         </article>
  18.     </section>
  19. }
  20.    
  21. <script>
  22.         $('section article').each(function (i, element) {
  23.             $(element).find('div.inner').css('float', 'right');
  24.             element = element.nextElementSibling.nextElementSibling;
  25.             $(element).find('div.inner').css('float', 'left');
  26.  
  27.         });
  28.     </script>
  29.    
  30. var index = 0;
  31. $('section article').each(function (i, element) {
  32.     var setFloat = (index % 2 === 0) ? "right" : "left";
  33.   $(element).find('div.inner').css('float', setFloat);
  34.   index++;
  35. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top