Thursday, 9 March 2017

CSS



How many CSS styles is there?
CSS Styles are 3 types
Inline styles : We can write styles inside of tag like this
<div style = “color:blue; font-size:14px”> content here</div>
Internal styles : We can write styles in head tag, between style tag, and we will use same class in like multi areas like below
Creating in between head and style tags
<head>
<style>class1{ color:blue; font-size:14px ;}</style>
</head>
Using in body area
<div class=”class1”>content</div>
·         External styles : we will write css styles in external style sheet, and we will add that style sheet in head or bottom,
Style like  this  inside of  styles.css file we will write like:  .class1{ color:blue; font-size:14px ;}
We will add that style sheet in header like this:
<head>
                <link rel=”stylesheet” href=”styles.css” />
</head>
Use CSS class like below:
<div class=”class1”>content</div>

Monday, 6 March 2017

Don't close drop down menus/Onclick body only close dropdown menus/ Drop downs dont close on click anchor

  • Don't close drop down menus
  • Onclick body only close dropdown menus
  • Drop downs dont close on click anchor
 <script>
         $('ul.dropdown-menu.mega-dropdown-menu').on('click', function(event){
            // onclick list item dont close dropdown menus
            event.stopPropagation();
        });
  </script>

Onhover div display icons or other data in div using jquery,

  • Onhover div display icons or other data in div using jquery,
  • you can display div on div using jquery
  • you can add any icon on hover mouse to div
  • Attached screenshot also
 <div class='classnamehere'>
description will goes here..
</div>

<script>
$( ".classnamehere" ).hover(
  function() {
    $( this ).append( $( "<div class='message-hovers'><span><a href='https://google.com'><i class='fa fa-commenting-o' aria-hidden='true'></i></a><a href='https://google.com'><i class='fa fa-flag' aria-hidden='true'></i></a><a href='https://google.com'><i class='fa fa-clock-o' aria-hidden='true'></i></a>  </span></div>" ) );
  }, function() {
    $( this ).find( "span:last" ).remove();
  }
);
 
</script>

Tuesday, 1 November 2016

Why creating span tag in react js / Unwanted span tags showing in firebug when I using react js

Very Interesting thing is when I started react js in browser im seeing unwanted span tags, but inside of editor nothing im not wrong..

When we using react js we need follow standard things
if we use spaces like <div> <link></link></div> between tags span tags automatically will create

Thursday, 27 October 2016

Onclick anchor tag that value insert into input text / onclick insert value in textbox / add value using jquery

  •  Onclick anchor tag that value insert into input text
  • Jquery code mandatory in bottom not header
  • Wherever use that code I explained into UL inside also


<ul  class="dropdown-menu listofcustomers">
                <input type="text" class="searchbox" id="searchlist"    />
                            <li><a href="#">Option 1</a></li>
                            <li><a href="#">Option 2</a></li>
                            <li><a href="#">Option 3</a></li> 
                            <li><a href="#">Option 4</a></li>
                           
                    </ul>
                   
                    <!-- need to change based on your version -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>

<script type="text/javascript">
$('.listofcustomers a').click(function() {
  var value = $(this).text();
  var input = $('#searchlist');
  input.val(value );
  return false;
});
</script>

How can remove textarea right bottom corner in dots / remove dots in text area / remove dots in bottom of textarea

How can remove textarea right bottom corner in dots / remove dots in text area / remove dots in bottom of textarea

.abc{resize: none;}


Tuesday, 4 October 2016

How can add fevicon to website

Add this code <link rel="icon" href="images/favicon.ico" type="image/x-icon" />
between <head></head>


put image in images folder
in above code image is .ico but use any format png or gif whataver