Saturday, 14 September 2013

Adding a pseudo style from jquery

Adding a pseudo style from jquery

Am having a trouble with following code. The problem when adding the
following style from jquery.
CSS
.arrow_box {
position: absolute;
width: 24px;
border-radius: 30px 30px 3px 3px;
height: 17px;
float:left;
}
.arrow_box:after {
border-color: rgba(136, 183, 213, 0);
border-top-color: #88b7d5;
border-width: 14px;
left: 0%;
}
jQuery
<script type="text/javascript">
$(document).ready(function () {
$('.arrow_box:after').css({
"border-color": "red",
"border-top-color": " #88b7d5",
"border-width": "12px",
"left": "0%"
});
});
</script>
There will not have any jquery error but it is not working

No comments:

Post a Comment