Difference between revisions of "Template:2015CSS"

(Added class alertMessage as well as id alertMessage, so you can have more than one alertMessage on a page)
Line 344: Line 344:
 
       }
 
       }
  
 +
 +
.pop_why {
 +
        position: fixed;
 +
        border: 1px solid #f58631;
 +
        width: 45px;
 +
        color:#f58631;
 +
font-weight: bold;
 +
text-align:center;
 +
border-radius: 7px;
 +
}
 +
 +
.pop_why:hover {
 +
        color: #fff;
 +
        background-color:#f58631;
 +
font-weight: normal;
 +
}
 +
 +
.pop_why_div {
 +
        position:fixed;
 +
        margin: 0px 100px;
 +
        top: 100px;
 +
        width:400px;
 +
        color:black;
 +
        background-color: white;
 +
        border: 2px solid #f58631;
 +
        border-radius: 5px;
 +
        padding: 10px 10px 10px 10px;
 +
        text-align:left;
 +
-webkit-box-shadow: -2px -2px 15px 2px rgba(50, 50, 50, 0.64);
 +
-moz-box-shadow:    -2px -2px 15px 2px rgba(50, 50, 50, 0.64);
 +
box-shadow:        -2px -2px 15px 2px rgba(50, 50, 50, 0.64);
 +
 +
}
 
</style>
 
</style>
 +
 +
 +
<script ="text/javascript">
 +
$(document).ready(function() {
 +
 +
// Attaches a hover script to every item with the class 'pop_why'
 +
$('.pop_why').hover(
 +
        function() {
 +
                      // Does the pop_why need to be installed?
 +
                if ( ! $(this).children('.pop_why_div').length ) {
 +
                        $(this).append("<DIV class='pop_why_div' style='display:block'>Loading...</div>");
 +
                              $(this).find('.pop_why_div').load( $(this).attr("data-poptitle") + '?action=raw' );
 +
                }
 +
                var foo = $(this).find('.pop_why_div').show();
 +
        } ,
 +
        function() {
 +
                $(this).find('.pop_why_div').clearQueue();
 +
        $(this).find('.pop_why_div').hide();
 +
                $(this).find('.pop_why_div').clearQueue();
 +
                $(this).find('.pop_why_div').hide();
 +
}
 +
        );
 +
});
 +
</script>
 +
  
  

Revision as of 21:13, 5 February 2015