<button title="View Label" type="button" class="btn btn-primary btn-sm m-1 openFrame" data-path="@item.ImagePath"> <i data-feather="image"></i> </button>
<script> // open label viwer var openFrame = document.querySelectorAll('.openFrame'); for(var i=0; i< openFrame.length; i++){ openFrame[i].addEventListener('click',function(){ var ImgPath = this.getAttribute('data-path'); //alert(ImgPath); var viewImgeFrame = document.getElementById('viewImgeFrame'); viewImgeFrame.src = ImgPath; viewImgeFrame.classList.add("img-fluid"); var lableViewer = new bootstrap.Modal(document.getElementById('lableViewer')); lableViewer.show(); }) } // open item log </script> }
No comments:
Post a Comment