In this attr jQuery example I will show you how to get angularjs image title using jQuery. Normally we are get the title of the image using $('#Selector).attr('Title'). But if you use this for angularjs image you will not get it.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
$(function () {
$("#dialog1").dialog("option", "title", $('#image1').attr('ng-Title'))
});
<img id="image1" data-ng-src="{{slide.Path}}" ng-title="{{slide.AlternateText}}" />
<div id="dialog1" title="Dialog Title" align="center" hidden="hidden">
<div class="body">
Display image title for dialog popup
<br />
<br />
</div>
</div>
Here, I displayed the image title on jQuery ui dialog modal popup using jQuery title attribute.
Post your comments / questions
Recent Article
- How to add two numbers in Android Studio? | Source Code
- FindViewByID returns null in android studio -SOLVED
- Saving changes is not permitted in SQL SERVER - [SOLVED]
- Restore of database failed. File cannot be restored over the existing. -[SOLVED]
- One or more projects in the solution were not loaded correctly in Visual Studio 2019 | FIXED
- How to find Laptop's Battery Health?
- SOLVED-Related Field got invalid lookup: icontains error in Django
- How to enable Search Feature in Django admin?
Related Article