Jump to content

Convert from Jquery to Javascript. Hepl me


Recommended Posts

        border:1px solid #F5F5F5;
        box-shadow:1px 1px 5px #999;
    .msgBox ul, .msgBox li{
        .msgBox .title{
            border-bottom:#AAA solid 1px;
            font-family:Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
            text-shadow:1px 1px #DDD;
        .msgBox .msgContent{
            border-top:#F5F5F5 solid 1px;
            text-shadow:1px 1px #F1F1F1;
            font-family:Cambria, "Hoefler Text", "Liberation Serif", Times, "Times New Roman", serif;
        .msgBox .ok{
            text-shadow:1px 1px #F1F1F1;
            font-family:Cambria, "Hoefler Text", "Liberation Serif", Times, "Times New Roman", serif;
            margin:0 auto 5px auto;
            padding:4px 5px 4px 5px;
            transition:all 300ms linear;
            border:#DDD solid 1px;
            box-shadow:0 0 1px #AAA;
        .msgBox .ok:hover{
<div class="msgBox">
    <ul class="title">Alert</ul>
    <ul class="msgContent">No messege</ul>
        <li class="ok">Ok</li>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script language="javascript">
// Upgraded confirm function
var msgBox = function(msg){
    var w =$(document).width(),
        h = $(document).height();
    var msgW = $('.msgBox').width(),
        msgH = $('.msgBox').height();
    $('.msgBox').css({left:(w-msgW)/2, top:(h-msgH)/2});
msgBox('Enter your message!');

Demo: http://www.yepi3games.org/alert.htm

Edited by Fb86
Link to comment
Share on other sites

  • 3 months later...
This topic is now closed to further replies.
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.