Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you are loading the partial with ajax on the client side explicitly, you can just add a complete function to call:</p> <pre><code>$( "#storeContainer" ).load( "url/for/partial", function () { if ($('.version').length !== 0) { if (parseFloat($('.version').text().slice(5)) &gt; 1.7) { $('.analysis').show(); } else { $('.analysis').hide(); } } }); </code></pre> <p>Of course, you'll probably want the "url/for/partial" to use @Url.Content or @Url.Action if you can.</p> <p>If you are using The Ajax Helper, you can set the OnSuccess property of your AjaxOptions to call you back:</p> <pre><code>@Ajax.ActionLink("Refresh", "Store", new AjaxOptions { HttpMethod = "POST", UpdateTargetId = "storeContainer", InsertionMode = InsertionMode.Replace, OnSuccess = "updateSuccess" }); </code></pre> <p>where you have defined your OnSuccess function in javascript:</p> <pre><code>var updateSuccess = function () { if ($('.version').length !== 0) { if (parseFloat($('.version').text().slice(5)) &gt; 1.7) { $('.analysis').show(); } else { $('.analysis').hide(); } } </code></pre> <p>There are some other ideas about how to include the script in your partial view or call it during your ajax success event on <a href="https://stackoverflow.com/questions/11800204/how-to-initialize-jquery-ui-widgets-that-may-be-loaded-dynamically-in-mvc3-appli">How to initialize jquery ui widgets that may be loaded dynamically in MVC3 application</a> </p> <p>If you were using Asp.net AJAX, you could use <code>Sys.Application.add_load(function(){...})</code>. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload