Pages

Sunday, December 15, 2013

508 Compliance tools

Tool-
-----
http://achecker.ca/checker/index.php

Guidelines-
----------
http://achecker.ca/guideline/view_guideline.php?id=2

Tool
----
http://valet.webthing.com/access/url.html

Tool-
-----
PowerMapper



Site for list of tools-
----------------------
http://jimthatcher.com/webcourse3.htm
http://usabilitygeek.com/10-free-web-based-web-site-accessibility-evaluation-tools/
http://www.inqbation.com/508-compliance-rules-and-testing-tools/
www.w3.org/WAI/ER/Tools/Complete.html

Monday, December 9, 2013

CSS Media Queries for iPads & iPhones

http://stephen.io/mediaqueries/#iPhone

CSS Media Queries for 
iPads & iPhones

Many times I've had to design responsive websites targeting specific devices with CSS media queries, and not just base the break points from the site's content. Because of this, I've ended up with a somewhat large list of CSS media queries for typical devices over the past year or two.

I've posted these media queries to help designers & developers save some time searching. I'll continue adding to the list as Apple (or another company that can sell a significant amount of products) releases them.


iPad Media Queries (All generations - including iPad mini)
Thanks to Apple's work in creating a consistent experience for users, and easy time for developers, all 5 different iPads (iPads 1-5 and iPad mini) can be targeted with just one CSS media query. The next few lines of code should work perfect for a responsive design.

iPad in portrait & landscape
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)  { /* STYLES GO HERE */}
iPad in landscape
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : landscape) { /* STYLES GO HERE */}
iPad in portrait
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : portrait) { /* STYLES GO HERE */ }
iPad 3 & 4 Media Queries
If you're looking to target only 3rd and 4th generation Retina iPads (or tablets with similar resolution) to add @2x graphics, or other features for the tablet's Retina display, use the following media queries.

Retina iPad in portrait & landscape
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (-webkit-min-device-pixel-ratio: 2) { /* STYLES GO HERE */}
Retina iPad in landscape
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : landscape)
and (-webkit-min-device-pixel-ratio: 2) { /* STYLES GO HERE */}
Retina iPad in portrait
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : portrait)
and (-webkit-min-device-pixel-ratio: 2) { /* STYLES GO HERE */ }
iPad 1 & 2 Media Queries
If you're looking to supply different graphics or choose different typography for the lower resolution iPad display, the media queries below will work like a charm in your responsive design!

iPad 1 & 2 in portrait & landscape
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (-webkit-min-device-pixel-ratio: 1){ /* STYLES GO HERE */}
iPad 1 & 2 in landscape
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : landscape)
and (-webkit-min-device-pixel-ratio: 1)  { /* STYLES GO HERE */}
iPad 1 & 2 in portrait
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : portrait)
and (-webkit-min-device-pixel-ratio: 1) { /* STYLES GO HERE */ }
Updated on October 28, 2012
iPad mini Media Queries

Targeting the new iPad mini with CSS definitely isn't as difficult as it could have been. Apple thankfully made things easy on developers and gave the iPad mini the same resolution as the iPad 1 and 2.

As for the device-pixel-ratio of the iPad mini, I was informed by Daring Fireball's John Gruber that this also remains the same as the iPad 1 & 2.

This means it's really easy for developers to target all iPads with very little code, but it also means there's no way to specifically target an iPad mini with pure CSS. In other words, nothing is new, and you might want to make your text a tiny bit bigger.


iPad mini in portrait & landscape
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (-webkit-min-device-pixel-ratio: 1)  { /* STYLES GO HERE */}
iPad mini in landscape
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : landscape)
and (-webkit-min-device-pixel-ratio: 1)  { /* STYLES GO HERE */}
iPad mini in portrait
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : portrait)
and (-webkit-min-device-pixel-ratio: 1)  { /* STYLES GO HERE */ }
iPad mini Resolution
Screen Width = 768px (CSS Pixels)
Screen Height = 1024px (CSS Pixels)

Screen Width = 768px (Actual Pixels)
Screen Height = 1024px (Actual Pixels)

Device-pixel-ratio: 1
Updated on October 31, 2012
iPhone Media Queries

iPhone 5 Media Queries
iPhone 5 in portrait & landscape
@media only screen
and (min-device-width : 320px)
and (max-device-width : 568px) { /* STYLES GO HERE */}
iPhone 5 in landscape
@media only screen
and (min-device-width : 320px)
and (max-device-width : 568px)
and (orientation : landscape) { /* STYLES GO HERE */}
iPhone 5 in portrait
@media only screen
and (min-device-width : 320px)
and (max-device-width : 568px)
and (orientation : portrait) { /* STYLES GO HERE */ }
iPhone 2G, 3G, 4, 4S Media Queries
It's noteworthy that these media queries are also the same for iPod Touch generations 1-4.

iPhone 2G-4S in portrait & landscape
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) { /* STYLES GO HERE */}
iPhone 2G-4S in landscape
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px)
and (orientation : landscape) { /* STYLES GO HERE */}
iPhone 2G-4S in portrait
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px)
and (orientation : portrait) { /* STYLES GO HERE */ }
iPhone 5 Resolution
Screen Width = 320px (CSS Pixels)
Screen Height = 568px (CSS Pixels)

Screen Width = 640px (Actual Pixels)
Screen Height = 1136px (Actual Pixels)

Device-pixel-ratio: 2
iPhone 4/4S Resolution
Screen Width = 320px (CSS Pixels)
Screen Height = 480px (CSS Pixels)

Screen Width = 640px (Actual Pixels)
Screen Height = 960px (Actual Pixels)

Device-pixel-ratio: 2
iPhone 2G/3G/3GS Resolution
Screen Width = 320px (CSS Pixels)
Screen Height = 480px (CSS Pixels)

Screen Width = 320px (Actual Pixels)
Screen Height = 480px (Actual Pixels)

Device-pixel-ratio: 1

Thursday, October 17, 2013

Hover_one_element_effect_multiple_element CSS and HTML

CSS:

<style type="text/css">
    .section { background:#ccc; }
    .layer { background:#ddd; }
    .section img { border:2px solid #F90; }
    .section .layer { border:2px solid #F90; color:#ff0000; }
    .section:hover img { border:2px solid #ccc; }
    .section:hover .layer { border:2px solid #ccc; color:#ccc; }
  </style>

HTML:

    <div class="section">
        <img src="test.png" alt="test" title="hover" border="0" />
        <div class="layer">
            Lorem Ipsum</div>
    </div>
   

Wednesday, October 9, 2013

Tab Nav Active Hover JS code

$("ul.nav li").click(function () {
    $("ul.nav li").removeClass('selected');
    $(this).addClass('selected');

});

Href Navigation Active Hover JS code

$('.nav li a').each(function() {
if (str.indexOf(this.href.toLowerCase()) > -1) {
$('.nav li a').removeClass("active");
$(this).addClass("active");
}
});
}); 

Increase and Decrease font size JS Code

// Increase Font Size
$(".increaseType").click(function(e){
e.preventDefault();
var currentFontSize = $('#main-content,#sidebar-right,#healthcare-professionals-popup').css('font-size');
var currentFontSizeNum = parseFloat(currentFontSize, 10);
var newFontSize = currentFontSizeNum+1;
if (newFontSize < 18) {
$('#main-content,#sidebar-right,#healthcare-professionals-popup').css('font-size', newFontSize);
}
return false;
});
// Decrease Font Size
$(".decreaseType").click(function(e){
e.preventDefault();
var currentFontSize = $('#main-content,#sidebar-right,#healthcare-professionals-popup').css('font-size');
var currentFontSizeNum = parseFloat(currentFontSize, 10);
var newFontSize = currentFontSizeNum-1;
if (newFontSize >= 12) {
$('#main-content,#sidebar-right,#healthcare-professionals-popup').css('font-size', newFontSize);
}
return false;
});

Monday, August 19, 2013

Finding li count using Jquery

$('#survey-popup .ddChild').each(function () {