Posts filed under ‘jquery’

restricting charcters in textarea using jquery

restricting charcters in textarea using jquery then for solution click here

Advertisements

September 16, 2010 at 5:31 am Leave a comment

split single list into multiple vertical columns using jquery

if you have a single list of and wants to split them into multiple columns then click here for solution

September 7, 2010 at 3:45 am 1 comment

Jquery | Some useful and qucik scripts

1. How to get x-axis and y-axis on mouse move
$().mousemove(function(e){
//display the x and y axis values inside the mouseOverMe div
$('#mouseOverMe').html("X Axis : " + e.pageX + " | Y Axis " + e.pageY);
});

HTML
<div id=”mouseOverMe”>Mouse over me</div>

2. Disabling Right click

$(document).ready(function(){
$(document).bind("contextmenu",function(e){
return false;
});
});

May 1, 2010 at 4:55 am 2 comments

Insert a character using jquery at some location using substring

Snippet

var count=$(‘.content’).length;
var before=$(‘.content’).text().substring(0,125);
var after=$(‘.content’).text().substring(125,count);
var result=before+’…’+after;

April 8, 2010 at 1:18 pm 1 comment

Floating message | Banner for IE6 users using jquery

CSS
———————–
#message_box {
position: absolute;
top: 0; left: 0;
z-index: 10;
background:#ffc;
padding:5px;
border:1px solid #CCCCCC;
text-align:center;
font-weight:bold;
width:99%;
}

Script
———————-
<script type=”text/javascript” language=”javascript”>

$(document).ready(function()
{
//scroll the message box to the top offset of browser’s scrool bar
$(window).scroll(function()
{
$(‘#message_box’).animate({top:$(window).scrollTop()+”px” },{queue: false, duration: 350});
if($(window).scrollTop()==0){

$(‘#message_box’).animate({top:$(window).scrollTop()+80+”px” },{queue: false, duration: 350});
}
});
//when the close button at right corner of the message box is clicked
$(‘#close_message’).click(function()
{
//the messagebox gets scrool down with top property and gets hidden with zero opacity

$(‘#message_box’).animate({ top:”+=15px”,opacity:0 }, “slow”);
});
});
</script>

HTML
—————————

<body>
<div id=”message_box”><img id=”close_message” style=”float:right;cursor:pointer”  src=”12-em-cross.png” />The floating message goes here</div>
<div>

content goes here

</div>

</body>

April 1, 2010 at 4:33 am Leave a comment

mouse cordinates using jquery

Jquery Code to get mouse co-ordinates.

$(“html”).click(function(e){ alert(‘X: ‘ + e.pageX +’, Y:’+ e.pageY); });

April 25, 2008 at 4:04 am 4 comments


Flickr Photos

Blog Stats

  • 724,912 hits