Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- this part goes before style type text/css --!>
- <script type="text/javascript"
- src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
- <script>
- $(document).ready(function() {
- //
- $('a.poplight[href^=#]').click(function() {
- var popID = $(this).attr('rel'); //Get Popup Name
- var popURL = $(this).attr('href'); //Get Popup href to define size
- var query= popURL.split('?');
- var dim= query[1].split('&');
- var popWidth = dim[0].split('=')[1]; //Gets the first query string value
- $('#' + popID).fadeIn().css({ 'width': Number( popWidth ) }).prepend('<a href="#" class="close"></a>');
- var popMargTop = ($('#' + popID).height() + 80) / 2;
- var popMargLeft = ($('#' + popID).width() + 80) / 2;
- //Apply Margin to Popup
- $('#' + popID).css({
- 'margin-top' : -popMargTop,
- 'margin-left' : -popMargLeft
- });
- $('body').append('<div id="fade"></div>');
- $('#fade').css({'filter' : 'alpha(opacity=80)'}).fadeIn(); //Fade in the fade layer - .css({'filter' : 'alpha(opacity=80)'})
- return false;
- });
- $('a.close, #fade').live('click', function() {
- $('#fade , .popup_block').fadeOut(function() {
- $('#fade, a.close').remove(); //fade them both out
- });
- return false;
- });
- });
- </script>
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
- <script src="http://static.tumblr.com/iuw14ew/VSQma1786/jquery.style-my-tooltips.js"></script>
- <!-- and this part goes after it --!>
- #fade { /*--Transparent background layer--*/
- display: none; /*--hidden by default--*/
- background:{color:scrollbar};
- position: fixed; left: 0; top: 0;
- width: 100%; height: 100%;
- opacity: .90;
- z-index: 9999;
- }
- .popup_block{
- display: none; /*--hidden by default--*/
- background:{color:background};
- font-family:calibri;
- color:#000;
- padding: 10px;
- border: 3px solid {color:background};
- float: left;
- height:200px;
- overflow:auto;
- font-size: 10;
- position: fixed;
- top: 50%; left: 50%;
- z-index: 99999;
- /*--CSS3 Box Shadows--*/
- -webkit-box-shadow: 0px 0px 20px #000;
- -moz-box-shadow: 0px 0px 20px #000;
- box-shadow: 0px 0px 20px #000;
- /*--CSS3 Rounded Corners--*/
- -webkit-border-radius: 5px;
- -moz-border-radius: 5px;
- border-radius: 5px;
- }
- img.btn_close {
- float: right;
- margin: -20 -20px 0 0;
- }
- /*--Making IE6 Understand Fixed Positioning--*/
- *html #fade {
- position: absolute;
- }
- *html .popup_block {
- position: absolute;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement