开发者

jQuery .load() losing style

开发者 https://www.devze.com 2023-01-26 17:12 出处:网络
I am using jquery to load a partial view. $(\"#policyMembers\").html(\'<div class=loader></div>\').load(\"<%= Url.Action(\"PolicyMembers\", \"Scheme\") %>\");

I am using jquery to load a partial view.

$("#policyMembers").html('<div class=loader></div>').load("<%= Url.Action("PolicyMembers", "Scheme") %>");

my partial view looks as follow:

<table class="grid">
<tr>
    <th>Title</th>
    <th>First Name</th>
    <th>Surname</th>
    <th>ID Number</th>
    <th>Date Of Birth</th>
    <th>Gender</th>
    <th>Cover</th>
</tr>

for some reason the grid class is not applied when loading the view using jQuery, but when i load it by making use of renderpartial, the style is applied.

any 开发者_如何学运维ideas?

0

精彩评论

暂无评论...
验证码 换一张
取 消