Let say somewhere in MVC 3 application I have
if (Model.ImageListGallery != null)
{
<h3>@ImagesTranslation.Gallery</h3>
foreach (var imageInGallery in Model.ImageListGallery)
{
<div id="@imageInGallery.IdImage">
<a rel="group" href= "@Url.Action("displaybig", "news", new { idNews = Model.IdNews, idImage = imageInGallery.IdImage })">
<img src= "@Url.Action("displaysmall", "news", new { idNews = Model.IdNews, idImage = imageInGallery.IdImage })" alt=""/></a>
@Html.Label(ImagesTranslation.Description)
@Html.TextArea("Description", imageInGallery.Description, new { id = "area" + imageInGallery.IdImage, onfocus = "removeDisabledBtnOnImage('" + imageInGallery.IdImage + "')" })
<button disabled="disabled" id="btn@(imageInGallery.IdImage)" onclick="saveDescription('@imageInGallery.IdImage')">@CommonTranslations.Save</button>
<img class="@imageInGallery.IdImage" src="@Href("~/Content/delete.png")" onclick="deleteImage('@imageInGallery.IdImage')" title="@ImagesTranslation.DeleteImage" alt=""/>
</div>
}
}
How would you use unobtrusive JavaScript with jQuery in that situation (event onfocus and onclick?