SOCIALIZE IT

Monday 23 December 2013

Current Time Watches



<script src="http://24timezones.com/js/swfobject.js" language="javascript"></script>
<script src="http://24timezones.com/timescript/cities2_countries/maindata.js.php?city=1000247374" language="javascript"></script>
<table><tr><td><div id="flash_container_tt52b40fd429f76"></div><script type="text/javascript">
    var flashMap = new SWFObject("http://24timezones.com/timescript/clock_final.swf", "main", "175", "175", "7.0.22", "#FFFFFF", true)
    flashMap.addParam("movie",      "http://24timezones.com/timescript/clock_final.swf");
    flashMap.addParam("quality",    "high");
    flashMap.addParam("wmode",    "transparent");
    flashMap.addParam("flashvars",  "color=FF00FF&logo=1&city=1000247374");
    flashMap.write("flash_container_tt52b40fd429f76");   
</script></td></tr><tr><td style="text-align: center; font-weight: bold"><a href="http://24timezones.com/current_local/india_time.php" target="_blank" style="text-decoration: none" title="timezones India">India</a></td></tr></table>

Thursday 21 November 2013

Placeholder IE using jquery for html5

<style>
 .placeholder { color:#999; }
</style>

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
</script>
<script>
 // A jQuery based placeholder polyfill
$(document).ready(function(){
  function add() {
    if($(this).val() === ''){
      $(this).val($(this).attr('placeholder')).addClass('placeholder');
    }
  }

  function remove() {
    if($(this).val() === $(this).attr('placeholder')){
      $(this).val('').removeClass('placeholder');
    }
  }

  // Create a dummy element for feature detection
  if (!('placeholder' in $('<input>')[0])) {

    // Select the elements that have a placeholder attribute
    $('input[placeholder], textarea[placeholder]').blur(add).focus(remove).each(add);

    // Remove the placeholder text before the form is submitted
    $('form').submit(function(){
      $(this).find('input[placeholder], textarea[placeholder]').each(remove);
    });
  }
});

</script>
</head>
<body>
 <input type='text' name='email' placeholder='Email Address'/>
 <input type='password' name='password' placeholder='Password'/>
</div>

Tuesday 19 November 2013

Add ( DIV ) js

<script type="text/javascript">
$(window).load(function(){
    var i=0;   
    $("#uniform-account_type > span").each(function(){
        $(this).append("<div class='blk'></div>");
        i++;
    })
});
</script>

Thursday 3 October 2013

Add Remove Class Onclick For Checkbox AND jQuery addClass() Method

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>button demo</title>
<style>
.is-checked { color:red; }
</style>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
</head>
<body>

<div class="fix_header">
<div class="test"> Add Remove Class </div>
<input type="checkbox" id="check">
</div>
<script>
$(window).load(function(){
    $('#check').attr('checked',false);
})
$(function () {
  $('.fix_header > input[type="checkbox"], input[type="radio"]').each(function () {
    $(this).on('click', function () {
      $(this).parent().wrap('<div>').unwrap(); 
        // works great for checkboxes, but not for radios
        if ($(this).prop('checked')) {
          
          $('div.test').addClass('is-checked');
        } else {
          $('div.test').removeClass('is-checked');
        }
    })
  })
})
</script>
</body>
</html>

-----------------------------------------------------------------

checkbox id display none

-----------------------------------------------------------------
<script src="http://code.jquery.com/jquery.js"></script>

<script>
jQuery(document).ready(function () {
   
    $('input.pokazkontakt').each(function(){
        if ($(this).is(':checked')) {
            $(this).parent().nextAll('.pkbox:first').css('display', 'none');
        } else {
            $(this).parent().nextAll('.pkbox:first').css('display', 'block');   
        }
    });

    $('input.pokazkontakt').click(function () {
        $(this).parent().nextAll('.pkbox:first').toggle('fast');
    });
});
</script>

<title>Checked Box</title>
</head>
<body>

 <h3><input type="checkbox" checked="checked" class="pokazkontakt">Bla bla</h3>
 <div class="pkbox">bla bla</div>
-----------------------------------------------------------------


-----------------------------------------------------------------

jQuery addClass() Method

-----------------------------------------------------------------

<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
</script>
<script>
$(document).ready(function(){
  $(".button").click(function(){
    $("#div1").addClass("important blue");
  });
});
</script>
<style type="text/css">
.important
{
font-weight:bold;
font-size:xx-large;
}
.blue
{
display:none;
}
</style>
</head>
<body>

<div id="div1">This is some text.</div>
<div id="div2">This is some text.</div>
<br>
<div class="button">Button</div>

</body>
</html>

Thursday 26 September 2013

Center - Middle Dynamic Code For IE Browser Sported...

<style>
html, body {
    height: 100%;
    background: #0099FF;
}
.inlay {
    height: 100%;
    text-align: center;
}

.inlay img {
    vertical-align: middle;
}
.helper {
    display: inline-block;
    height: 100%;
    vertical-align: middle;
}
</style>

<div class="inlay">
    <span class="helper"></span><img src="../yourImages.jpg" />
        IE Browser Sported  Center-Middle Images Dynamic Code
</div>

Tuesday 20 August 2013

Audio Play/Stop and up-down - HTML

<style>
.play,
.pause,
.up,
.down { background:#999999; float:left; margin:0px; padding:0px;
        border:2px solid #333333; color:#fff; padding:3px; cursor:pointer; }
</style>

<body>
 <audio autoplay id="player" src="sound/audio.wav"></audio>
<div>
    <button onclick="document.getElementById('player').play()" class="play">Play</button>
    <button onclick="document.getElementById('player').pause()" class="pause">Pause</button>
    <button onclick="document.getElementById('player').volume+=0.1" class="up">Volume Up</button>
    <button onclick="document.getElementById('player').volume-=0.1" class="down">Volume Down</button>
</div>
</body>

Thursday 15 August 2013

Create a simple CSS Dropdown Menu..

<style>
ul {
    font-family: Arial, Verdana;
    font-size: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}
ul li {
    display: block;
    position: relative;
    float: left;
}
li ul {
    display: none;
}
ul li a {
    display: block;
    text-decoration: none;
    color: #ffffff;
    border-top: 1px solid #ffffff;
    padding: 5px 15px 5px 15px;
    background: #1e7c9a;
    margin-left: 1px;
    white-space: nowrap;
}
ul li a:hover {
background: #3b3b3b;
}
li:hover ul {
    display: block;
    position: absolute;
}
li:hover li {
    float: none;
    font-size: 11px;
}
li:hover a { background: #3b3b3b; }
li:hover li a:hover {
    background: #1e7c9a;
}
</style>

</head>
<body>
<ul id="menu">
    <li><a href="#">Home</a></li>
    <li><a href="#">About Us</a>
        <ul>
            <li><a href="#">The Team</a></li>
            <li><a href="#">History</a></li>
            <li><a href="#">Vision</a></li>
        </ul>
    </li>
    <li><a href="#">Products</a>
        <ul>
            <li><a href="#">Cozy Couch</a></li>
            <li><a href="#">Great Table</a></li>
            <li><a href="#">Small Chair</a></li>
            <li><a href="#">Shiny Shelf</a></li>
            <li><a href="#">Invisible Nothing</a></li>
        </ul>
    </li>
    <li><a href="#">Contact</a>
        <ul>
            <li><a href="#">Online</a></li>
            <li><a href="#">Right Here</a></li>
            <li><a href="#">Somewhere Else</a></li>
        </ul>
    </li>
</ul>

</body>
</html>
----------------------------------------------------------------------------------------------------
You can see a LIVE PREVIEW here
You can see a LIVE PREVIEW here
http://www.handy-html.com/wp-content/uploads/2012/02/create-a-simple-css-dropdown-menu.html
----------------------------------------------------------------------------------------------------

Wednesday 31 July 2013

(< footer> ) - Tag IE issue.

If you're using <footer> (a fancy schmancy HTML5 tag) sometimes IE does not like it. This is how I've fixed issues like this. Add this to your <head>:

<script>document.createElement('footer');</script>

It may not be what's causing your issue, but I've notice when trying to use HTML5 tags, IE pretty much ignores them or renders them strangely.

Thursday 25 July 2013

PIE.htc - First chaild JS - html5 - css3 ( Spoted in IE 7,8,9 )

<!-------------PIE.htc and   First_chaild Spoted JS for IE 7,8,9 ---------------->
 
 
.class { behavior: url(/pie/PIE.htc); }


<!--[if IE 7]>
<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE7.js"></script>
<![endif]-->

<!--[if IE 8]>
<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE8.js"></script>
<![endif]-->

<!--[if IE 9]>
<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js"></script>
<![endif]-->


<!-----------------------------------   END  ----------------------------------->

<!------------- HTML5 and css3 Spoted JS for IE 7,8,9  ---------------->


<!--[if lt IE 9]>
    <script src="http://css3-mediaqueries-js.googlecode.com/files/css3-mediaqueries.js"></script>
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->


<!-----------------------------------   END  ----------------------------------->

Read More HTML ( Dynamically shortened Text with Show More link using jQuery )

<HTML>
<HEAD>
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<TITLE>Dynamically shortened Text with Show More link using jQuery</TITLE>
<STYLE>
body, input{
font-family: Calibri, Arial;
margin: 0px;
padding: 0px;
}
a {
color: #0254EB
}
a:visited {
color: #0254EB
}
#header h2 {
color: white;
background-color: #00A1E6;
margin:0px;
padding: 5px;
}
.comment {
width: 400px;
background-color: #f0f0f0;
margin: 10px;
}
a.morelink {
text-decoration:none;
outline: none;
}
.morecontent span {
display: none;

}
</STYLE>
</HEAD>
<BODY>


<div class="comment more">
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Vestibulum laoreet, nunc eget laoreet sagittis,
quam ligula sodales orci, congue imperdiet eros tortor ac lectus.
Duis eget nisl orci. Aliquam mattis purus non mauris
blandit id luctus felis convallis.
Integer varius egestas vestibulum.
Nullam a dolor arcu, ac tempor elit. Donec.
</div>

</BODY>
<SCRIPT>
$(document).ready(function() {
var showChar = 100;
var ellipsestext = "...";
var moretext = "more";
var lesstext = "less";
$('.more').each(function() {
var content = $(this).html();

if(content.length > showChar) {

var c = content.substr(0, showChar);
var h = content.substr(showChar-1, content.length - showChar);

var html = c + '<span class="moreelipses">'+ellipsestext+'</span>&nbsp;<span class="morecontent"><span>' + h + '</span>&nbsp;&nbsp;<a href="" class="morelink">'+moretext+'</a></span>';

$(this).html(html);
}

});

$(".morelink").click(function(){
if($(this).hasClass("less")) {
$(this).removeClass("less");
$(this).html(moretext);
} else {
$(this).addClass("less");
$(this).html(lesstext);
}
$(this).parent().prev().toggle();
$(this).prev().toggle();
return false;
});
});
</SCRIPT>
</HTML>

Wednesday 24 July 2013

My Photos


Popup HTML

<style>
.jeup-btn, input.jeup-btn { color:red!important;}
</style>
<script type="text/javascript" src="js/jquery-1.js"></script>
<script type="text/javascript" src="js/jquery_002.js"></script>
<script type="text/javascript" charset="utf-8">
jQuery(function() {
function launch() {
$('#je-popuplogin').lightbox_me({centered: true, onLoad: function() { $('#je-popuplogin').find('input:first').focus()}});
}
$('#jepopup').click(function(e) {
$("#je-popuplogin").lightbox_me({centered: true, onLoad: function() {
$("#je-popuplogin").find("input:first").focus();
}});
e.preventDefault();
});
});
</script>


<div class="menu">

  <a href="#" id="jepopup" class="jeup-btn">Click</a>


   <div style="left: 50%; margin-left: -210px; z-index: 1002; position: fixed; top: 50%; margin-top: -167px; display: none;" id="je-popuplogin">
      <div style="background:#fff; float:left; width:250px; height:200px; border:1px solid #666666;">
         <div>
           <a id="close-x" href="#">Close</a>
         </div>
         <div style=" padding:20px; ">
            Remember Me
         </div>          
      </div>                  
    </div>

</div>

RESPONSIVE CSS

/*********- RESPONSIVE CSS -*****************
smaller than 980
*************************************************************************************/
@media screen and (max-width: 980px) {

}

/************************************************************************************
smaller than 650
*************************************************************************************/
@media screen and (max-width: 650px) {

}

/************************************************************************************
smaller than 560
*************************************************************************************/
@media screen and (max-width: 480px) {
/* disable webkit text size adjust (for iPhone) */

}

Specific Browser CSS

 /*--------  Chrome Safari -------------*/
@media screen and (-webkit-min-device-pixel-ratio:0)
{
.test {
padding: 5px 5px;
}
}
/*-------- Chrome Safari END -------*/


 /*--------------- Safari -------------*/
@media screen and (-webkit-min-device-pixel-ratio:0) {
    /* Safari and Chrome */
     body { background:#00CCCC; }

    /* Safari only override */
     body { background:#00CCCC; }
    ::i-block-chrome, body { background:#FF0000; }
}
 /*-------------- Safari End -------------*/



/*-------------- Opera ----------------*/
@media not all and (-webkit-min-device-pixel-ratio:0) {
--- opera old version -----
}

@media not screen and (1) { /* OPERA 11.00 */
input[type="radio"] {
box-sizing: content-box;
height: 3px !important;
width: 3px !important;
float:left!important;
}
}

@media (min-resolution: .001dpcm) {
 Opera 12+Somthing
}
/*------------ Opera END ---------*/




/*-------------- IE 8---------------*/
@media \0screen {
 
}
/*-----------  IE 8 END ---------*/


/*--------- IE - 10 --------------*/
@media \0screen {

}
/*------  ie10 end ---------------*/


/*----------  IE 6, 7 and 8 -------*/
 @media \0screen\,screen\9 {

}
/*---------IE 6, 7 and 8 END ---------*/




=========================================
============== Other Demos ================
=========================================

=============== Safsri =====================
<style>
 .safari  .example { background:#996699; }
</style>

 <body>
<script>
   if (navigator.userAgent.indexOf('Safari') != -1 &&
       navigator.userAgent.indexOf('Chrome') == -1) {
           document.body.className += " safari";
       }
</script>
</body>
=============== Safsri End===================




<body>
<script src="http://github.com/rafaelp/css_browser_selector/raw/master/css_browser_selector.js" type="text/javascript"></script>
</body>


<style type="text/css">

/*---IE-All---*/
.ie .example {
  background-color: yellow;
}

/*---IE-7---*/
.ie7 .example {
  background-color: orange;
}

.gecko .example {
  background-color: gray;
}

/*---Fire-Fox---*/
.win.gecko .example {
  background-color: red;
}

.linux.gecko .example {
  background-color: pink;
}
/*---Opera---*/
.opera .example {
  background-color: green;
}

.konqueror .example {
  background-color: blue;
}

/*---Safari---*/
.webkit .example {
  background-color: black;
}
.example {
  width: 100px;
  height: 100px;
}
.no_js { display: block }
.has_js { display: none }
.js .no_js { display: none }
.js .has_js { display: block }
</style>

</head>

 </html>

=========================================
=========================================

<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
<!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en"> <![endif]-->
<!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en"> <![endif]-->
<!--[if IE 9]>    <html class="no-js ie9 oldie" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->

.ie7 .example {
  background-color: orange;
}
.ie8 .example {
  background-color: orange;
}
.ie9 .example {
  background-color: orange;
}


=========================================
========= Compatible View Issue IE 7,8,9  ========

 This is how I've fixed issues like this. Add this to your
 <head>

<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE" /> 


========= Compatible View Issue IE 7,8,9  ========
=========================================