Showing posts with label CSS. Show all posts
Showing posts with label CSS. Show all posts

Friday, 5 March 2021

Add and remove a class on click using jQuery

 


<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

<script>
jQuery(document).ready(function(){
jQuery('#btnSubmit').on('click', function() {
jQuery(this).addClass('toggle').removeClass('codepen');   
});
});
</script>

According To Question:

#jQuery add remove class onclick codepen
#Add Class jQuery
#jQuery Onclick Remove Class And Addclass
#toggle class jQuery
#Onclick Add And Remove Class To Body
#Add Class JavaScript
#jQuery Add Class On Click
#Remove Class In JavaScript
#Add Remove Class Onclick By jQuery


Saturday, 20 February 2021

Change Div Order In Mobile View By jQuery

 

Web View

                             
                           Before Change              After Change 



<html>
    <head>
<title>Change Div Order In Mobile View By jQuery.</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
        <style type="text/css">
           body{
padding:20px;
   }
            #container {
                width:100%;
                margin: 0 auto;
text-align: center;
            }
.display_inline{
border: 2px solid;
width: auto;
display: inline-block;
padding: 150px 100px;
margin: 22px;
font-size: 50px;
color: #fff;
font-family: emoji;
}
#div1{
background:#1a3a5f;
}
#div2{
background:#79286c;
}
@media only screen and (max-width: 600px) {
.display_inline{
width: auto;
display: block !important;
bolder:2px solid red;
padding: 10%;
}
}
           
        </style>
<script src="https://code.jquery.com/jquery-3.5.0.js"></script>
    </head>
    <body>
       
        <div id="container">
            <div id="div1" class="display_inline">
<div class="center">
Div One
                </div>
                
            </div>
            <div id="div2" class="display_inline">
<div class="center">
                    Div Two
                </div>
            </div>  
        </div>
<script type="text/javascript">
function listenWidth( ) {
if (jQuery(window).width() <= 600) {
jQuery("#div2").remove().insertBefore(jQuery("#div1"));
} else {
jQuery("#div2").remove().insertAfter(jQuery("#div1"));
}
}
jQuery(document).ready(function(){
listenWidth();
});
jQuery(window).resize(function() {
listenWidth();
});
</script>
    </body>
</html>


According To Question:

#Change Div Position In Mobile
#How To Change Div Position In Responsive
#jQuery Change Order Of Divs
#Change Order Of Divs Responsive
#Div Order Change jQuery
#jQuery Change Column Order
#Javascript Reorder Divs
#Change Div Position By jQuery


Friday, 25 August 2017

Display spinner with jQuery-ui autocomplete

Add below Class CSS in Your CSS style with loading.gif image

.ui-autocomplete-loading{
background:url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-2CAHF5Z8aPGaK1rsXDzE773kXI9aMrtoTK865ZzNo7VHuhrHJevNyh-dmcMVEDXdB_nMdMlkK1EokWTsbgQgmN7ToHUmWfN3B_JlxIlG5KPPxk5eADuQxyXbMrLSpgivPAzMwNu6l84/s320/loading.gif') no-repeat right center !important;
}



Friday, 24 June 2016

How to add external link in target and class

<head>
    <script src="https://code.jquery.com/jquery-1.9.1.min.js"></script>
    <script type='text/javascript'>
$( document ).ready(function() {

  $('a').filter(function() {
  return this.hostname && this.hostname !== location.hostname;
}).attr('target', '_blank');

  $('a').filter(function() {
  return this.hostname && this.hostname !== location.hostname;
}).addClass("external");

});
    </script>
</head>

Monday, 25 April 2016

Blink By CSS


<html>
<style>
.blink_a_div a.blink_a_link{
border: 4px solid;
font-size: 20px;
}
.blink_a_div a{
  background-color: #AD906C;
  border: 1px;
  color: #FFFFFF;
  cursor: pointer;
  display: inline-block;
  font-family: Arial;
  font-size: 20px;
  padding: 5px 10px;
  text-align: center;
  text-decoration: none;
}

.blink_a_div a{
  -webkit-animation: glowing 1500ms infinite;
  -moz-animation: glowing 1500ms infinite;
  -o-animation: glowing 1500ms infinite;
  animation: glowing 1500ms infinite;
}

@-webkit-keyframes glowing {
  0% { background-color: #AD906C; -webkit-box-shadow: 0 0 3px #AD906C; }
  50% { background-color: #D5B07D; -webkit-box-shadow: 0 0 40px #D5B07D; }
  100% { background-color: #AD906C; -webkit-box-shadow: 0 0 3px #AD906C; }
}

@-moz-keyframes glowing {
  0% { background-color: #AD906C; -moz-box-shadow: 0 0 3px #AD906C; }
  50% { background-color: #D5B07D; -moz-box-shadow: 0 0 40px #D5B07D; }
  100% { background-color: #AD906C; -moz-box-shadow: 0 0 3px #AD906C; }
}

@-o-keyframes glowing {
  0% { background-color: #AD906C; box-shadow: 0 0 3px #AD906C; }
  50% { background-color: #D5B07D; box-shadow: 0 0 40px #D5B07D; }
  100% { background-color: #AD906C; box-shadow: 0 0 3px #AD906C; }
}

@keyframes glowing {
  0% { background-color: #AD906C; box-shadow: 0 0 3px #AD906C; }
  50% { background-color: #D5B07D; box-shadow: 0 0 40px #D5B07D; }
  100% { background-color: #AD906C; box-shadow: 0 0 3px #AD906C; }
}


</style>

<body>
<div style="text-align:center">
<div class="blink_a_div">
<a class="blink_a_link" href="http://phpkishan.blogspot.in/" title="Blink By CSS" target="_blank">Blink By CSS</a>
</div>
</div>
</body>

</html>

Monday, 22 February 2016

CSS Mouseover Zoom Effect

Mouseover Zoom Effect


Use this CSS

<style>
.image{
-webkit-transition: 0.4s ease;
transition: 0.4s ease;
-moz-transform:0.4s ease;
}

.image:hover{
opacity: 0.8;
transform: scale(1.05);
-webkit-transform: scale(1.08);
-moz-transform: scale(1.08);
}
</style>