css - jQuery tooltip class not working after ajax call -
i have functions called onclick events, works excelent. send $.post() request , on success retrieve (data) returned php file called in post() request.
my wierd problem jquery tooltip plugin doesn't read css stylesheet after ajax call, partially. yeap, that's why said wierd.
i customized tooltip black, 3 rounded corners , small, white text, , looks great, after ajax call, corners , size of text changed (all corners rounded , bigger text). tooltip works looks strange. here's code:
css declarations
#atooltip { position: absolute; display: none; z-index: 50000;
}
#atooltip .atooltipcontent { position:relative; margin:0; padding:0; } .defaulttheme { border:2px solid #444; background:rgba(102,102,102,1); color:rgba(255,255,255,1); text-shadow:0 0 3px #666; font-weight:bold; font-size:11px; margin:0; padding:3px 6px; -moz-border-radius: 12px 12px 12px 0; -webkit-border-radius: 12px 12px 12px 0; -khtml-border-radius: 12px 12px 12px 0; border-radius: 12px 12px 12px 0; -moz-box-shadow: 2px 2px 5px #111; /* firefox 3.5+ */ -webkit-box-shadow: 2px 2px 5px #111; /* safari , chrome */ box-shadow: 2px 2px 5px #111; /* safari , chrome */
}
.defaulttheme #atooltipclosebtn { display:block; height:12px; width:18px; background:url(../images/closebtn.png) no-repeat; text-indent:-9999px; outline:none; position:absolute; top:-20px; right:-30px; margin:2px; padding:4px; }
head declarations of course
<link rel="stylesheet" media="screen" href="css/style.css" /> <link rel="stylesheet" media="screen" href="css/atooltip.css" /> <link rel="stylesheet" media="screen" href="css/jquery-ui.css" />
javascript functions
function addcul(culid, pid) { var value = culid.value; $.post("post.php", { addcolid: value, prodid: pid }, function(data) { $('.culori').html(data); $('.normaltip').tooltip(); }) }
and there images see.
hope can figure out, 'cause anoying.
edit. got point, added css markup, can't add html, it's simple reference. have <button onclick="function()"></button>
wich works fine. jquery post works fine well, tooltip looks how see in pictures. can't explain why it's keeping colors, not text size. , happening after executing jquery post , reload data target div.
Comments
Post a Comment