Search This Blog

Thursday, May 21, 2015

Accordion Slider and menu


Welcome to Designer Blog here i have posted Accordion Slider with JavaScript

 without using Jquery Plugins . it can use as menu and for content slider

Step1:

These are two output which can produce using this Accordion Javascript






Script:
 <script type="text/javascript">
    $(function () {

        var menu_ul = $('.menu > li > ul'),
               menu_a = $('.menu > li > a');

        menu_ul.hide();

        menu_a.click(function (e) {
            e.preventDefault();
            if (!$(this).hasClass('active')) {
                menu_a.removeClass('active');
                menu_ul.filter(':visible').slideUp('normal');
                $(this).addClass('active').next().stop(true, true).slideDown('normal');
            } else {
                $(this).removeClass('active');
                $(this).next().stop(true, true).slideUp('normal');
            }
        });

    });
 $(document).ready(function () {
        $('.menu > li > a.active').next().stop(true, true).slideDown('normal');
      
    });
</script>


Style:






.accordionmenu {
    height: auto;
    padding-left: 10px;
}
.accordionmenu > li > a {
    background: #ededed url("../images/down-arrow.png") no-repeat scroll 183px 10px;
    border-bottom: 1px solid #fff;
    color: #333;
    display: block;
    font-family: "Helvetica Neue",Helvetica,Arial,sans-serif !important;
    font-weight: normal;
    height: 2.75em;
    line-height: 2.75em;
    position: relative;
    text-indent: 1em;
    width: 100%;
}
.accordionmenu ul li a {
    background: #e0e0e0 none repeat scroll 0 0;
    border-bottom: 1px solid #efeff0;
    color: #003767;
    display: block;
    font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
    font-size: 0.923em;
    font-weight: 400;
    height: 2.75em;
    line-height: 2.75em;
    position: relative;
    text-indent: 1.75em;
    width: 100%;
}
.accordionmenu ul li a.active {
    color: #007db1;
}
.accordionmenu ul li:last-child a {
    border-bottom: 1px solid #fff;
    outline: 0 none;
}
.accordionmenu > li > .accordionmenu > li > a.active {
    background: #ededed url("../images/uparrow.png") no-repeat scroll 183px 10px;
    border-bottom: 1px solid #fff;
    color: #007db1;
    outline: 0 none;
}
.accordionmenu > li > a.active {
    background: #ededed url("../images/uparrow.png") no-repeat scroll 183px 10px;
    border-bottom: 1px solid #fff;
    color: #007db1;
    outline: 0 none;
}


Html  Code:




<div class="pure-u-1 border-bttms">
                                    <ul class="accordionmenu" style="padding-left: 0px; width: 100% ! important;">
                                      <li class="item1"> <a href="#" class="active" style="font-size: 18px; background-position: 685px 10px; background-color: #ededed; color: #333333;">Review of the Application Documents <span class="job-labl"></span></a>
                                        <ul style="display: block;">
                                          <li class="job-list">axccor ssions should come from government through the ministry in charge of international borrowing </li>
                                          <li class="job-list">All requests should indicate that the project is within development priorities</li>
                                          <li class="job-list">The request for funding should be supported by an economic feasibility study, projected cash flow and the financing plan </li>
                                        </ul>
                                      </li>
                                      <li class="item2"> <a href="#" style="font-size: 18px; background-position: 685px 10px; background-color: #ededed; color: #333333;">Initial Assessment <span class="job-labl"></span></a>
                                        <ul style="display: none;">
                                          <li class="job-list">Review of the submission and
                                            evaluation of the economic feasibility process allows the ADFD to
                                            understand the project, and coordinate with other financing institutions
                                            involved in funding the projects. </li>
                                        </ul>
                                      </li>
                                      <li class="item3"> <a href="#" style="font-size: 18px; background-position: 685px 10px; background-color: #ededed; color: #333333;">Project Appraisal <span class="job-labl"></span></a>
                                        <ul style="display: none;">
                                          <li class="job-list">The appraisal process allows ADFD to
                                            ascertain the economic conditions, review the soundness of the
                                            feasibility study, assess the validity of the cost estimate and assess
                                            the capabilities of the beneficiary in administering, executing,
                                            operating and maintaining the project.  ​​</li>
                                          <li class="job-list">(ADFD may accept appraisal reports conducted by one of the other financing institutions.) ​​</li>
                                        </ul>
                                      </li>
                                      <li class="item4"> <a href="#" style="font-size: 18px; background-position: 685px 10px; background-color: #ededed; color: #333333;">Loan Approval <span class="job-labl"></span></a>
                                        <ul style="display: none;">
                                          <li class="job-list">Once approved by ADFD’s Board of
                                            Directors, the beneficiary will be notified and the loan negotiation
                                            process will commence in preparation for the loan signature. ​​</li>
                                        </ul>
                                      </li>
                                    </ul>
                                  </div>

Output:

Enjoy Folks




Thursday, February 26, 2015

How to remove the inline style using Jquery

Welcome to designer Blog here i have posted how to remove the inline style using Jquery


Step 1:

  <script type="text/javascript">

        $(document).ready(function () {

     
            $("#MyCalendar").find("table, tr, td").eq(1).removeAttr("style");
                    
        });

    </script>

Html Structure

<div id="calendar">
  <h2>Events</h2>
  <table cellspacing="0" cellpadding="1" border="0" style="border-width:0px;border-collapse:collapse;" title="Calendar" class="table table-bordered" id="MyCalendar">
    <tbody>
      <tr>
        <td colspan="7"><table cellspacing="0" border="0" style="width:100%;border-collapse:collapse;" class="month">
            <tbody>
              <tr>
                <td valign="middle" style="width:15%;" class=""><a title="Go to the previous month" style="color:Black" href="javascript:__doPostBack('MyCalendar','V5479')">&lt;</a></td>
                <td align="center" style="width:70%;">February 2015</td>
                <td valign="middle" align="right" style="width:15%;" class="navigation"><a title="Go to the next month" style="color:Black" href="javascript:__doPostBack('MyCalendar','V5538')">&gt;</a></td>
              </tr>
            </tbody>
          </table></td>
      </tr>
      <tr>
        <th align="center" scope="col" abbr="Sunday">Su</th>
        <th align="center" scope="col" abbr="Monday">Mo</th>
        <th align="center" scope="col" abbr="Tuesday">Tu</th>
        <th align="center" scope="col" abbr="Wednesday">We</th>
        <th align="center" scope="col" abbr="Thursday">Th</th>
        <th align="center" scope="col" abbr="Friday">Fr</th>
        <th align="center" scope="col" abbr="Saturday">Sa</th>
      </tr>
      <tr>
        <td align="center" style="width:14%;">25</td>
        <td align="center" style="width:14%;">26</td>
        <td align="center" style="width:14%;">27</td>
        <td align="center" style="width:14%;">28</td>
        <td align="center" style="width:14%;">29</td>
        <td align="center" style="width:14%;">30</td>
        <td align="center" style="width:14%;">31</td>
      </tr>
      <tr>
        <td align="center" style="width:14%;">1</td>
        <td align="center" style="width:14%;">2</td>
        <td align="center" style="width:14%;">3</td>
        <td align="center" style="width:14%;">4</td>
        <td align="center" style="width:14%;">5</td>
        <td align="center" style="width:14%;">6</td>
        <td align="center" style="width:14%;">7</td>
      </tr>
      <tr>
        <td align="center" style="width:14%;">8</td>
        <td align="center" style="width:14%;">9</td>
        <td align="center" style="width:14%;">10</td>
        <td align="center" style="width:14%;">11</td>
        <td align="center" style="width:14%;">12</td>
        <td align="center" style="width:14%;">13</td>
        <td align="center" style="width:14%;">14</td>
      </tr>
      <tr>
        <td align="center" style="width:14%;">15</td>
        <td align="center" style="width:14%;">16</td>
        <td align="center" style="width:14%;">17</td>
        <td align="center" style="width:14%;">18</td>
        <td align="center" style="width:14%;">19</td>
        <td align="center" style="width:14%;">20</td>
        <td align="center" style="width:14%;">21</td>
      </tr>
      <tr>
        <td align="center" style="width:14%;">22</td>
        <td align="center" style="width:14%;"><a href="EventsDescription.aspx?JkV2ZW50c19JRD0zJlByaU1lbnVJRD0wJm1udT1Qcmk=" title="Events" class="calendar-tips">23<br>
          Events Title 08</a></td>
        <td align="center" style="width:14%;">24</td>
        <td align="center" style="width:14%;">25</td>
        <td align="center" style="width:14%;">26</td>
        <td align="center" style="width:14%;">27</td>
        <td align="center" style="width:14%;">28</td>
      </tr>
      <tr>
        <td align="center" style="width:14%;">1</td>
        <td align="center" style="width:14%;">2</td>
        <td align="center" style="width:14%;">3</td>
        <td align="center" style="width:14%;">4</td>
        <td align="center" style="width:14%;"><a href="EventsDescription.aspx?JkV2ZW50c19JRD00JlByaU1lbnVJRD0wJm1udT1Qcmk=" title="Events" class="calendar-tips">5<br>
          Events Title En</a> <a href="EventsDescription.aspx?JkV2ZW50c19JRD01JlByaU1lbnVJRD0wJm1udT1Qcmk=" title="Events" class="calendar-tips"><br>
          Test Title</a></td>
        <td align="center" style="width:14%;">6</td>
        <td align="center" style="width:14%;">7</td>
      </tr>
    </tbody>
  </table>
</div>


Step3:

Here is the javascript code  which remove the inline style

My Calendar is ID of the table and findind the tabe tr td, eq is used for removing the 1st position of

the style attribute

      $("#MyCalendar").find("table, tr, td").eq(1).removeAttr("style");


Step4:

Enjoy Folks





Monday, February 2, 2015

How to design the triangle Menu using css3


Welcome to designers blog here i have posted how to  design the triangle Menu using CSS3



Step1:

To do triangle menu use the css3 property  called before and after .

Step2:

To do this triangle shape we should use the below css class

.menu-navigation .active {
    position: relative;
    color: #fff !important;
    background: #dd052b !important;
    float: left;
    padding: 0px 15px;
}
.menu-navigation .active:after, .menu-navigation .active:before {
    top: 100%;
    left: 50%;
    border: solid transparent;
    content: " ";
    height: 0;
    width: 0;
    position: absolute;
    pointer-events: none;
}
.menu-navigation .active:after {
    border-color: rgba(136, 183, 213, 0);
    border-top-color: #dd052b;
    border-width: 13px;
    margin-left: -13px;
}
.menu-navigation .active:before {
    border-width: 36px;
    margin-left: -36px;
}

Step3:

HTML Markup: 

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<style type="text/css">
*
{
    margin:0px;
    padding:0px;
}
ul li {
    margin: 0px;
    padding: 0px;
    list-style-type: none;
}
.menu-navigation {
    float: left;
}
.menu-navigation li {
    float: left;
    margin: 0px 3px 0px 0px;
    display: block;
    background-color: #d4d4d3;
}
.menu-navigation li a {
    font-family: 'Andika', sans-serif;
    font-size:14px;
    padding: 5px 15px 5px 15px;
    float: left;
    color: #4c4c4c;
    text-decoration: none;
}
.menu-navigation .active {
    position: relative;
    color: #fff !important;
    background: #dd052b !important;
    float: left;
    padding: 0px 15px;
}
.menu-navigation .active a {
    color: #fff !important;
}
.menu-navigation .active:after, .menu-navigation .active:before {
    top: 100%;
    left: 50%;
    border: solid transparent;
    content: " ";
    height: 0;
    width: 0;
    position: absolute;
    pointer-events: none;
}
.menu-navigation .active:after {
    border-color: rgba(136, 183, 213, 0);
    border-top-color: #dd052b;
    border-width: 13px;
    margin-left: -13px;
}
.menu-navigation .active:before {
    border-width: 36px;
    margin-left: -36px;
}
</style>
<link href='http://fonts.googleapis.com/css?family=Andika' rel='stylesheet' type='text/css'>
</head>
<body>
<div class="menu-navigation">
  <ul>
    <li ><a href="#">Home </a></li>
    <li class="active"><a href="#">Domino's</a></li>
    <li><a href="#">Toolbox</a></li>
    <li><a href="#">Departments</a></li>
  </ul>
</div>
</body>
</html>


Step4 :

Out put







Thursday, October 16, 2014

Accordion menu with jQuery in slideToggle() method

Welcome to Designers Dairy blog here i have posted how to Up and Down the arrow On clicking


<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<style type="text/css">
.refine-arrow-up
{
    background: url(refine-up.jpg) no-repeat 0 0;
    display:block;
    width:25px;
}
.refine-arrow-down  a
{
color:red;
}
.refine-arrow-up  a
{
color:orange;
}
 a:hover
{
color:green;
}
.refine-arrow-down
{
    background: url(refine-down.jpg) no-repeat 0 0;
    display:block;
    width:25px;
}
.red
{
 color:red;   
}
a
{

    color:#ccc;
    margin-left:30px;
}

</style>
<script type="text/javascript">
$(document).ready(function() {
  
    $("#refine-description").click(function()
    {
          if ($(this).hasClass('refine-arrow-up'))
        {
             $(this).removeClass('refine-arrow-up');
             $(this).addClass('refine-arrow-down');
        }

       else if($(this).hasClass('refine-arrow-down'))
       {
           $(this).removeClass('refine-arrow-down');
           $(this).addClass('refine-arrow-up');
       }
 });
     
});

</script>

</head>

<body>
  <div id="refine-description" class="refine-arrow-down">
                  <a href="#"> Refine </a>
                </div>
</body>
</html>
 

Tuesday, October 7, 2014

how to use custom Tamil fonts on your website with css

Welcome to designers dairy blog  here i have post the article  you can use custom tamil fonts on 
your website.


Download LM-  TM Bharani and upload in http://www.font2web.com/ and  it will generate the

Eot ,Woff, Ttf  and Svg Formats


Convert Font (.ttf or .otf):

http://www.font2web.com/

<style type="text/css">
@font-face {
    font-family: 'LM-  TM Bharani ";
    src: url('fonts/tccb.eot');
    src: url('fonts/tccb.eot?#iefix') format('embedded-opentype'),
         url('fonts/tccb.woff') format('woff'),
         url('fonts/tccb.ttf') format('truetype'),
         url('fonts/tccb.svg#tccb') format('svg');
    font-weight: normal;
    font-style: normal;
}
</style>

Tuesday, September 23, 2014

how to align the text middle in div container.

Welcome to designers blog here i have posted how to align the text  middle in div container.

Step1:

 Style:

  div {
      width: 250px;
      height: 100px;
      line-height: 100px;
      text-align: center;
      border: 1px solid #123456;
    }

    span {
      display: inline-block;
      vertical-align: middle;
   
      line-height: normal;
    }


Step2:

Html:

    <div>
      <span>Lorem ipsum dolor sit amet, consectetur adipiscing .</span>
    </div>


Step3:

Enjoy Folks

Thursday, September 11, 2014

CSS Hack

 Safari  and Chrome Css Hack
 
@media screen and (-webkit-min-device-pixel-ratio:0) {
    /* Safari and Chrome */
    .search .button {
        margin-top:0px;
    }

    /* Safari only override */
    ::i-block-chrome,.search .button {
         margin-top:1px;
    }
}


Google chrome only

@media screen and (-webkit-min-device-pixel-ratio:0) {
     .reg-textbx {
    padding: 10px 0 9px 10px;
   }
}

Validating to select in sequencial order using angular

    < input type = "checkbox" (change) = "handleSelectTaskItem($event, taskItem)" [checked] = " taskItem . i...