Saturday 12 September 2015

Add Spoiler In Blogger Blog Posts


Installing Spoiler in Posts - This time I will share simple tips how to make a spoiler with a slide effect in the blog post .

First , go to the blogger >> Template >> Edit HTML >> Apply CSS code below before
]]></b:skin>



#flippy {
    text-align: center;
}
#flippy button {
    background: #aa65c7;
    color: #fff;
    text-align: center;
    margin: 0 auto;
    border: none;
    border-radius: 3px;
    padding: 8px 16px;
    margin: 10px auto;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0px 3px 0px 0px #883da7;
    vertical-align: middle;
    cursor: pointer;
    text-shadow: 0 1px rgba(0, 0, 0, 0.3);
    transition: background 0.1s ease-in-out;
}
#flippy button:hover, #flippy button:focus {
    background: #9e4fbf;
    outline: none;
}
#flippanel {
    padding: 1px;
    text-align: left;
    background: #f5f5f5;
    border: 0px;
}
#flippanel {
    padding: 24px;
    display: none;
}
Apply the below jQuery code before the </body>
<script>
$(document).ready(function() {
    $("#flippy").click(function() {
        $("#flippanel").slideToggle("normal");
    });
});
</script>
Then apply the following HTML code in your blog posts.
<div id="flippy"><button>nOmii</button></div>
<div id="flippanel">
A Photographer From Pakistaan
</div>
You are done 

No comments:

Post a Comment