Home » Archive

Articles in the jQuery Category

CSS3, Design, HTML5, jQuery »

[10 Apr 2013 | No Comment | ]

Mobile & Tablet Emulator is an useful online tool to check the screen resolution on different mobile and tablet devices.
Do you check your mobile website screen resolution on multiple devices straight from your desktop. It is now possible with this mobile emulator.
Launch >> Mobile & Tablet Emulator
Below web app screenshot and some the devices in which you can check your screen resolution.
Mobile Emulator Web app screenshots:
Screenshot1

Screenshot2

Screenshot3

Mobile devices supported:

BlackBerry: 320×240
iphone4s: 320×480
iphone5: 320×568
Galaxy S3: 360×640
Lumia 900: 480×800

Tablet devices supported:

Kindle Fire 7: 533×853
Google Nexus: 603×966
Apple iPad: 768×1024

Download directly from Google webstore. Best …

jQuery »

[13 Aug 2012 | No Comment | ]

Problem: Need to populate text input or textbox control when user selects combobox using jQuery.
Solution: Easy solution with jQuery $(‘#combobox’).val(); on change event handler.
Lets see how to use it in code.

jQuery combobox select value:
<html>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>jquery combobox select</title>
<script src=”js/jquery-1.7.2.min.js” type=”text/javascript”></script>
<script type=”text/javascript”>
$().ready(function(){

$(‘#monthCMB’).change( function(){
$(‘#monthTXT’).val( $(this).val() );
}).click( function(){
$(‘#monthTXT’).val( $(this).val() );
});

})
</script>
</head>

<body>
<select id=”monthCMB”>
<option value=”">Select Month</option>
<option value=”January”>January</option>
<option value=”February”>February</option>
<option value=”March”>March</option>
<option value=”April”>April</option>
<option value=”May”>May</option>

jQuery »

[12 Aug 2012 | No Comment | ]

Problem: How to get selected option’s key/value of a combobox using jQuery
Solution: It is easy to get jquery select option using $(‘#genderCMB option:selected’).text()
Let us see how to use jQuery option selected to get select option.

jQuery option selected:
Simple code to get jquery option selected value from combobox.
<html>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>jquery combobox selected option</title>
<script src=”js/jquery-1.7.2.min.js” type=”text/javascript”></script>
<script type=”text/javascript”>
$().ready(function(){

$(‘#genderBTN’).click(function()
{
alert($(‘#genderCMB option:selected’).text());
alert($(‘#genderCMB option:selected’).val());
});

})
</script>
</head>
<body>
<select name=”genderCMB” id=”genderCMB”>
<option value=”M”>Male</option>
<option value=”F”>Female</option>
</select>

Javascript, jQuery »

[10 Aug 2012 | No Comment | ]

We might have wanted to get URL of the current page in jQuery or to manipulate parts of the current page URL in jQuery. In this article we will discuss how to get URL of current page in jquery and also how to get parts of the url in jquery.
Tutorial difficulty:

Basic users
used: jQuery, HTML

In this article we will access the url of the current page using location object, location.href property holds the current page URL.

Window Location Object:
Each page path or the URL is referenced in window.location.href property, The location Objects …

Design, jQuery »

[2 Aug 2012 | No Comment | ]

JavaScript is a scripting language. jQuery is a framework that uses the JavaScript language to write JavaScript code faster. jQuery is a library written in JavaScript.
In most of the situation we might have wanted to call jQuery Function from javascript. That might not work as normal as how we call a javascript function from another js function or jquery function to another.
Tutorial difficulty:
Basic users
Problem: How to call jQuery function from javascript?
Solution: Create function declaration in script and function definition inside jQuery, so we have the handle of jQuery function outside …