This time I will share jQuery Plugin and tutorial about Floating Popup Window Plugin With jQuery – Translucent, hope it will help you in programming stack.
Translucent is a simple yet customizable jQuery popup plugin for creating floating panels that can be dragged, closed, minimized, maximized, expanded and collapsed.
How to use it:
1. Import jQuery library together with the jQuery Translucent plugin’s files into the html file.
1 |
< link rel = "stylesheet" href = "translucent/style.css" > |
3 |
integrity = "sha384-nvAa0+6Qg9clwYCGGPpDQLVpLNn0fRaROjHqs13t4Ggj3Ez50XnGQqc/r8MhnRDZ" |
4 |
crossorigin = "anonymous" > |
6 |
< script src = "translucent/jquery-translucent.js" ></ script > |
2. Create a basic floating popup window on the page.
1 |
$( "body" ).translucent({ |
2 |
titleText: "Popup Title" , |
3 |
textHtml: "<p>Popup Content</p>" |
3. Possible plugin customization options which can be overridden by passing in an object to the translucent()
function.
01 |
$( "body" ).translucent({ |
04 |
target: "translucentDefultId" , |
19 |
border: "1px solid #ddd" , |
28 |
backgroundColor: "rgb(225, 225, 225)" , |
34 |
titleGroundColor: "#999" , |
49 |
titleFontColor: "#000" , |
52 |
titleFontFamily: "Open Sans" , |
55 |
titleTextCenter: false , |
4. Execute a function when the user tries to close the popup window.
1 |
$( "body" ).translucent({ |
2 |
close: function ($dom) { |
This awesome jQuery plugin is developed by hulalalalala. For more Advanced Usages, please check the demo page or visit the official website.