14-Modals Setup
Key Objectives
Overview
Steps
<!-- Bootstrap core CSS Modules--> <link href="node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet"> <link href="node_modules/bootstrap/dist/css/bootstrap-theme.min.css" rel="stylesheet"> <link rel="stylesheet" href="node_modules/font-awesome/css/font-awesome.min.css"> <link href="node_modules/animate.css/animate.min.css"> <!-- Fonts --> <link href='https://fonts.googleapis.com/css?family=Belleza' rel='stylesheet'> <link href="" rel="stylesheet" type="text/css"> <!-- Custom styles for this template --> <link rel="stylesheet" href="node_modules/animate.css/animate.min.css"> <link rel="stylesheet" href="node_modules/magnific-popup/dist/magnific-popup.css"> <link href="css/main.css" rel="stylesheet" type="text/css"> </head><!--========================== Scripts Section ============================--> <!-- Bootstrap & jQuery Scripts - Note: jQuery must be first --> <script src="node_modules/jquery/dist/jquery.min.js"></script> <script src="node_modules/bootstrap/dist/js/bootstrap.min.js"></script> <!-- jQuery 3rd Party Scripts--> <script src="node_modules/wowjs/dist/wow.min.js"></script> <script src="node_modules/magnific-popup/dist/jquery.magnific-popup.min.js"></script> <!-- Custom scripts for this template --> <script src="js/main.min.js"></script> </body><div class="col-md-3" href="assets/img/robot1.jpg" title="CSS Creature"> <a class="portfolio-item with-caption img-link mfp-title" style="background-image: url(assets/img/badge-blue.png);" href="assets/img/robot1.jpg" title="CSS Work"> <div class="details"> <h4>Portfolio 1</h4> <span>CSS Creature</span> </div> </a> </div>/*------------------- MAGNIFICO STARTER - Code from a starter example by the creator. https://codepen.io/dimsemenov/pen/hutrb -------------------*/ $('.with-caption').magnificPopup({ type: 'image', closeBtnInside: false, mainClass: 'mfp-with-zoom mfp-img-mobile', image: { verticalFit: true, titleSrc: function (item) { /*More could be done here...... Also doesn't fit so good on iPad. */ var caption = item.el.attr('title'); return caption; } }, /*This will let us click through images eventually....*/ gallery: { enabled: true }, });.image-link { cursor: -webkit-zoom-in; cursor: -moz-zoom-in; cursor: zoom-in; } /* aligns caption to center */ .mfp-title { text-align: center; padding: 2px 2px; }
Last updated