Display title, Image and description dynamically based on image click on Modal Popup

MOHAMED ASIK ADAM 1 Reputation point
2021-10-18T10:03:13.21+00:00

Hi All,

I have a scenario in which I need to display a modal popup based on user click. When user click on the image it should open the same image in small size with Title and description Dynamically. How to achieve this?
2 code scenario needed:

  1. 1st I need to display in Html and Jquery- Code.
  2. Dynamically get the data from SharePoint list (OnlineSpfx) and display .-Code.
Microsoft 365 and Office SharePoint For business Windows
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 40,471 Reputation points Microsoft External Staff
    2021-10-21T09:40:48.877+00:00

    Hi @MOHAMED ASIK ADAM ,
    We can first create a div to store image and list data and it should be hidden as default. Then make a function change the properties of hidden on click. Here is my code for sample.
    142397-sample.txt


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.