You can also include scripts runtime using jQuery. It makes it easy to have lazy script loading.
See the example below :
$(function(){
$("head").append("");
//Or, loading only when the slow stuff is ready:
$("img,form").load(function(){
$("head").append("");
});
});
Search This Blog
Wednesday, August 25, 2010
Create a 'Back-To-Top' link using jQuery with disappearing effect.
Use the following script :
$(function(){
/* set variables locally for increased performance */
var scroll_timer,
displayed = false,
$message = $('#message a'),
$window = $(window),
top = $(document.body).children(0).position().top;
/* react to scroll event on window */
$window.scroll(function () {
window.clearTimeout(scroll_timer);
scroll_timer = window.setTimeout(function () { // use a timer for performance
if($window.scrollTop() <= top) // hide if at the top of the page
{
displayed = false;
$message.fadeOut(500);
}
else if(displayed == false) // show if scrolling down
{
displayed = true;
$message.stop(true, true).show().click(function () { $message.fadeOut(500); });
}
}, 100);
});
});
see the example from the below site :
http://briancray.com/2009/10/06/scroll-to-top-link-jquery-css/
$(function(){
/* set variables locally for increased performance */
var scroll_timer,
displayed = false,
$message = $('#message a'),
$window = $(window),
top = $(document.body).children(0).position().top;
/* react to scroll event on window */
$window.scroll(function () {
window.clearTimeout(scroll_timer);
scroll_timer = window.setTimeout(function () { // use a timer for performance
if($window.scrollTop() <= top) // hide if at the top of the page
{
displayed = false;
$message.fadeOut(500);
}
else if(displayed == false) // show if scrolling down
{
displayed = true;
$message.stop(true, true).show().click(function () { $message.fadeOut(500); });
}
}, 100);
});
});
see the example from the below site :
http://briancray.com/2009/10/06/scroll-to-top-link-jquery-css/
Labels:Asp.Net 2.0
JQuery
Manage Search textbox value with jQuery
How to manage search textbox value when there is some default text in textbox and on focus or blur that text will not appear using jQuery??
See the example :
$(function(){
//set default value:
$("#searchbox")
.val('search?'); // textbox contains default value 'search'
.focus(function(){this.val('')})
.blur(function(){
(this.val() === '')? this.val('search?') : null;
});
});
See the example :
$(function(){
//set default value:
$("#searchbox")
.val('search?'); // textbox contains default value 'search'
.focus(function(){this.val('')})
.blur(function(){
(this.val() === '')? this.val('search?') : null;
});
});
Labels:Asp.Net 2.0
JQuery
How to access iFrame elements using jQuery?
To access the iFrame elements inside the javascript, there is a method contents(), which enables us to access elements of iFrame.
See the example below :
$(function(){
var iFrameDOM = $("iframe#ID").contents();
//Now you can use find() to access any element in the iframe:
iFrameDOM.find(".message").slideUp();
//Slides up all elements classed 'message' in the iframe
});
See the example below :
$(function(){
var iFrameDOM = $("iframe#ID").contents();
//Now you can use find() to access any element in the iframe:
iFrameDOM.find(".message").slideUp();
//Slides up all elements classed 'message' in the iframe
});
Labels:Asp.Net 2.0
JQuery
Wednesday, August 11, 2010
Rating with jQuery
It is an example of rating control using in asp.net with jQuery and get more functionality of messaging on hover of an image.
See the demo and download source from the following website "
http://www.marcofolio.net/webdesign/jquery_quickie_colourful_rating_system_with_css3.html
Labels:Asp.Net 2.0
JQuery
Chkeditor with full functionality with jQuery
Above is an example of chkeditor. It includes flash, Images, tables and many functionality at design side.
This editor is also multilingual editor. You can also change the languages and according to that your editor works.
You can download source from the following site :
http://www.queness.com/post/212/10-jquery-and-non-jquery-javascript-rich-text-editors
http://ckeditor.com/demo
Labels:Asp.Net 2.0
JQuery
Friday, August 6, 2010
How to find nth row or table using jQuery?
Try this :
$(document).ready(function(){
$("table tr:eq(3)).css("background","#000");
}) ;
$(document).ready(function(){
$("table tr:eq(3)).css("background","#000");
}) ;
Labels:Asp.Net 2.0
JQuery
Thursday, August 5, 2010
How to Search in google?
There are some ways to search in google engine.You googling many ways but with the right commands and shortcuts which will help to you.
- One powerful way to search is use search prefix like if you want to search for a website then write 'site' and seperate word by colon and write your search words or you can say predefined triggers :
- for example :
- site : asp.net
- weather : Ahmedabad
- images : cartoon
- You can add suffix also if you know your particular search like you want to search India map then write India Map. Google gives answer immediately.
- Third powerful thing about google is that it does Math Conversation also like if you type 7+10 in google it gives you answer 17 rather then search other things. You can also calculate square root values also like (5+10) + (sqrt 10) ^15 you get 31622791.6.
- Fourth one is that Conversations like if you want to 1 $ to Indian rs you can do it very simply by writing 1 dollar in rupees, 20f to c (converts Fahrenheit to Celsius)
- Now last but not the list, you can search specific files like pdf or doc or others. For this purpose use filetype prefix.
- filve point some one filetype : pdf
Labels:Asp.Net 2.0
General
Subscribe to:
Comments (Atom)

