jquery

set total number of checkbox in array

i have check box array like this for($j=1;$j<=10;$j++) <input type="checkbox" name="chkLimit[]" id="chkLimit_<?php echo $j;?>" value="<?php echo $j;?>" /> i got 10 check box and i write the jquery code like this... $(document).ready( function (){ setLimitSelection(); } ); function setLimitSelection(){ $('input...

scrolling text within a div

Hello guys, In a page I'm working on I have html container for a div height not more than 200px, however I need to fit in a text that requires 300px and I don't want to show the scroll-bar on the right side so I'm looking for some ways/plug-ins in order to scroll the text within the div. I'd like to be able to scroll down, to scroll up ...

Stopping the jQuery blur event within the blur function.

I have a textbox that I am using the blur event to validate the text with a regular expression. If it fails I want the textbox to keep the focus. I know in regular javascript you can say return functionName(); in the onblur event within the actual html control. Is there a way to do something similar when binding the blur event within the...

retrieve each values in the Div

this piece of code will loop for several time; When any user select any of the radio button I want to find which radio button is selected; With the selected index i want to get address_ object; now i want to access its siblings div values like addressLine_1, addressLine_2, addressLine_3, city, state, zip in a variable. Please help to m...

a way to tell if options do not fit inside of a select - in IE

In IE6, and possibly 7, if you set the width of an to any value other then auto, if the options inside of that select are wider then the select's width, they get cut off. this is bad. Firefox is smart enough to not do this. Question: How can i tell if the options are being cut off with javascript? How have you dealt with this issue ...

How to get the response?

Hello! My problem would be that I make a POST request with jqurery, and if there is an error I modify the HTTP status to for example 401 and echo the error. (I'm using $.ajax();) So, the problem is that I don't know how to print out that error message. If I check it in firebug I get something like this: {"*THE URL OF THE FILE*":{"rc":4...

Replacing all <br> with <br />

I'm using this (jQuery) to replace all <br>s with <br /> to clear out validation errors: $("<br>").replaceAll("<br />"); but it doesn't reduce any validation errors. Does validator check the original source? ...

need sample of jquery modal dialog content loaded from controller action

My ASP.NET MVC app opens and displays the dialog fine however I can't figure out how to get DB content into it. I have read about making an ajax call to get the data. My disconnect is how it gets displayed in my . Any links where this is done (full code). Thanks. ...

disable all check boxes

following code work fine but 1 error $(document).ready( function() { $("#myCheckboxes input[type='checkbox']").change(function() { var checked = $("#myCheckboxes input[type='checkbox']:checked").length; if(checked == 4){ $("#myCheckboxes input[type='checkbox']") .attr('disabled',true) ....

JQuery datepicker - set callback order

I'm using the JQuery datepicker and show it to the user with some days disabled. Certain users in my site can mark some days in an agenda as 'being available', their working hours so to speak. Their availability has to be reflected in the calendar to other users. I have searched the web for this, and it seems that one should use the bef...

Getting jquery going: 'Object Expected' error

I'm creating a basic ASP.NET MVC app. I want to use jquery to have two buttons submit the form in different ways. The error I get is "Object expected". Here are the buttons: <input type="button" id="StartTask" value="Start" onclick="StartTask()" /> <input type="button" id="StopTask" value="Stop" onclick="StopTask()" /> Here are ...

Problem using jQuery clone function in form

Those snippes of code that you will check works fine for FF, Chrome, Safari, but seems to be a problem with IE when running jQuery clone function: My template: <form method="post" action="/post/add/"> {{ form.management_form }} <div class='table'> <table class='no_error'> <input id="id_mypost_set-0-title" type="text" ...

Efficiently Detect When Sibling Elements Overlap

Example: <div id="big">&nbsp;</div> <div class="small">&nbsp;</div> <div class="small">&nbsp;</div> <div class="small">&nbsp;</div> <div class="small">&nbsp;</div> <div class="small">&nbsp;</div> <!-- ...and so on --> "#big" is positioned absolutely behind a portion of the ".small"s, but is not a parent element. I have been doing thi...

Jquery Form to insert into a table and on submit of the main form submit the table to ASP.NET MVC Controller

this may sound kind of convoluted but basically i want to have a form within a form that submits items to the parent form in a table or something of the sort and then submit that with the parent form to an asp.net controller so i can move it to the database. Anyone know of a way of doing this? I know I can inject into a table using jqu...

Interactive Javascript Bar

Hi all, I'm looking for a way to create an interactive bullet graph, which will allow the user to click anywhere in the graph and set a marker, then calculate some simple values based on where this marker is at. For example, I'd like it to look similar to this: http://www.usrecordings.com/test-lab/bullet-graph.htm Yet, allow the user...

jQuery tooltip image preview not working

Hey experts, I have a simple image gallery that I've paginated, and I want to to use a hover effect on roll over like the one in use at istockphoto.com, for previewing the images without having to leave the page. This jQuery tooltip plugin looks simple, straightforward, and well-written, so I implemented on my site. The plugin is here:...

jQuery adding and removing classes on Anchor

I can't figure out why I cant remove a class from a then add a new one. I can change its css using .css(...) but using .removeClass and .addClass dont seem to work. I am using add and remove class on some spans and that works just fine. Anyone know what i am doing wrong? Thanks so much! the html <ul id="menu"> <li><span>&nbsp;</spa...

What is a good approach to synchronizing JQuery Animations?

As I currently understand $("#someElement").animate() it will execute asynchronously relative to any other JavaScript statements. For instance: $("#anotherElement").css("display", "none"); $("#someElement").animate(); //Setting the CSS display may fire AFTER the animation takes place. If I am correct in my understanding of how ani...

JQuery Lightbox 2 Plugin problem

I'm working on a gallery, which use jQuery Lighbox 2 (plugin page). I have the problem, that the navigation entries are also visible, when an image is selected (see example here). For the navigation i'm using css menu. Can someone tell me, how to make the enties invisible, when an image was selected? ...

Accessing jQuery object

Hi there, I know this sounds pretty trivial, but I'm new to jQuery... I use this plugin: http://www.emposha.com/javascript/fcbkcomplete.html Its source code contains: jQuery(function ($) { $.fn.fcbkcomplete = function (opt) { return this.each(function () { /// ... /// ...implementation deleted... ...