Note that there are some explanatory texts on larger screens.

plurals
  1. POShowing Overall Description on button click
    primarykey
    data
    text
    <p>I have a UI where more than three div's are there which has the data's with different ids but with the common button called as "Read".I have displayed the messages in which I have kept the message body as a tiny(15) on this Read button it show me the entire body of the message.How to achieve this one way that I am trying to do is as follows:</p> <pre><code>foreach (var item in Model.MyNote) { &lt;div class="row"&gt; @if (item.Owner.Roles.Any(cx =&gt; cx.RoleName == "Customer")) { &lt;div class="panel"&gt; &lt;div class="row"&gt; &lt;div class="three columns"&gt; &lt;img src="@Request.Url.FormatAbsoluteUrl(@item.Owner.Personal.ImageURL)" /&gt; &lt;span style="text-align: center;"&gt; @item.Owner.Personal.FirstName @item.Owner.Personal.LastName &lt;/span&gt; &lt;/div&gt; &lt;div class="nine columns"&gt; &lt;input type="hidden" value="@item.Id" id="messid" /&gt; &lt;p class="parahide1"&gt;@item.Description &lt;/p&gt; &lt;p class="parahide"&gt;@item.Description.ToTiny(15) &lt;/p&gt; &lt;/div&gt; @*&lt;a href="@Url.Action("Read", "Appointment", new { @id = item.Id })" class="button" id="read"&gt;Read&lt;/a&gt;*@ &lt;button class="button" id="read"&gt;Read&lt;/button&gt; &lt;/div&gt; &lt;/div&gt; } else if (item.Owner.Roles.Any(cx =&gt; cx.RoleName == "Professional")) { &lt;div class="panel"&gt; &lt;div class="row"&gt; &lt;div class="nine columns"&gt; &lt;p&gt;@item.Description &lt;/p&gt; &lt;/div&gt; &lt;div class="three columns"&gt; &lt;img src="@Request.Url.FormatAbsoluteUrl(@item.Owner.Professional.ImageURL)" /&gt; &lt;span style="text-align: center;"&gt;@item.Owner.Professional.CompanyName&lt;/span&gt; &lt;/div&gt; &lt;/div&gt; &lt;a href="@Url.Action("Read", "Appointment", new { @id = item.Id })" class="button"&gt;Read&lt;/a&gt; &lt;/div&gt; } &lt;/div&gt; &lt;script type="text/javascript"&gt; $(function () { $(".parahide1").hide(); $("#read").live('click',function () { $(".parahide").hide(); $(".parahide1").show(); }); }); &lt;/script&gt; } </code></pre> <p>This give the the result but it is showing the description of all the div's even if I click on the button of the first div.</p>
    singulars
    1. This table or related slice is empty.
    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. 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