Skip to content

Bevin-Pavithran/load-in-modal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Load In Modal

This project allows the user load content of a link on a modal. When an user clicks on a link, the content of the link is loaded on an iFrame within the modal.

Requirements

jQuery.min.js boostrap.min.js boostrap.min.css

How to use

Sample HTML page:

<html lang="en">
<head>
  <title>Load In Popup</title>
  <meta charset="utf-8">
  <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
  <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
  <script src="loadinModal.js"></script>
    <link rel="stylesheet" href="loadinModal.css">
  <script>
    $(document).ready(function () {
      $('.addtomodal').loadInModal();
    });
  </script>
</head>
<body>

<div class="container">
  <a href="http://example.com/" class="btn addtomodal">Example</a><br>
  <a href="http://w3schools.com" class="btn addtomodal">W3ccc</a>
</div>
</body>
</html>

Here, <a></a> tags with class addtomodal is loaded within a modal.

$(document).ready(function () {
  $('.addtomodal').loadInModal();
});

Add class to hyperlink

<a href="http://example.com/" class="btn addtomodal">Example</a><br>

About

Load link href in pop up modal

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published