jquery - MVC Ajax refresh interval text highlight changing values -


i have made mvc view partial view witch refreshing every x seconds. that's works fine, but: want highlight values changing. if 1 row changing want highlight row couple of seconds. this: http://domajax.com/documentation/data-highlight-color (successes , errors).

my master view:

@using moviestore.domain.entities  @model ienumerable<igrouping<movie, timetable>> @{     viewbag.title = "actuele bezetting"; }  <h2>bezetting voor vandaag</h2>  <div id="timetabel">     @{ html.renderpartial("_timetable", model); } </div> <script type="text/javascript">     window.setinterval(function () {          $("#timetabel").load('@(url.action("gettimetable","timetable",null, request.url.scheme))');      }, 5000); </script> 

partial view:

@using moviestore.domain.entities  @model ienumerable<igrouping<movie, timetable>>  <table class="table">     <tbody>         @foreach (var group in model)         {             <tr>                 <td>                     <div class="col-lg-9">                         <h4>@group.key.moviename</h4>                         <table class="table">                             <tbody>                                 <tr><td>starttijd</td><td>vrije plaatsen</td></tr>                                  @foreach (var tt in group)                                 {                                     <tr>                                         <td>@tt.starttime.toshorttimestring()</td>                                         <td>@tt.seatsavaible</td>                                     </tr>                                 }                             </tbody>                         </table>                     </div>                  </td>             </tr>         } </table> 

and controller:

public async task<actionresult> index()         {             var model = await gettimetabelmodel();             return view(model);         }          public async task<actionresult> gettimetable()         {             var model = await gettimetabelmodel();             return partialview("_timetable", model);         }           private async task<ienumerable<igrouping<movie, timetable>>> gettimetabelmodel()         {             return timetablerepo.timetables.where(tt => tt.starttime.date == datetime.now.date).groupby(tt => tt.movie);         } 


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -