jquery

Dynamically adding values to a form with JQuery/Javascript

I am creating a private message system to allow users to communicate between one another within the context of the website (ie, not emails). I have created this function to handle all my form submissions. I would like to achieve a solution without modifying this function (ideally). $("form.reload").submit(function(){ alert($(this)...

jQuery fn.extend ({bla: function(){}} vs. jQuery.fn.bla

OK I think I get http://stackoverflow.com/questions/1991126/difference-jquery-extend-and-jquery-fn-extend in that the general extend can extend any object, and that fn.extend is for plugin functions that can be invoked straight off the jquery object with some internal jquery voodoo. So it appears one would invoke them differently. ...

Adding a drop down menu with jquery

Hi everyone! Here's the situation I have a webpage which has one drop down called prefer. I wanted the user to be able to choose one option and then have a link next to it called "Add" which generates another textbox with the same options, i was going to use jquery to show an additional drop down. But if possible I wanted to put the se...

JQuery Help: slidetoggle() is not working properly

Hi all, I'm trying to use JQuery Slidetoggle functionality, but not able to use properly. The problem I'm currently facing is my div is sliding down on the click of slide image icon, but after that suddenly data div (in which data is loading) disappears. Means sliding down is perfect but div (in which data is loading , here #divMain) i...

Use jQuery to match variable text?

Hello! I have a sidebar navigation that lists blog entry titles down the side of the page. I am trying to write some jquery that will check the text in the title of the current full blog entry page and match it with the corresponding title in the sidebar navigation so that I can apply a class to style for an active state link ... but I'm...

jQuery .attr() crashing Internet Explorer

Hello everyone, This is my first time posting a question here, as I usually try to find solutions myself. This one, though, being an IE issue, just drives me crazy. I use jQuery cycle plug-in on a website I made and, to populate a caption div, I use a little function that is called after the image is loaded, which uses the "alt" attrib...

jQuery select element in sibling's "td"

HTML is <tr> <td><input /></td> <td><a>ref</a></td> </tr> I got $('a') What is the most optimal way to get <input /> from this ? If they are together <input /><a></a>, i can use $('a').sibling('input'), but they are in different td's ...

JavaScript "confirm" on SelectedIndexChange of RadioButtonList

I have a RadioButtonList control and I would like to do a Javascript "confirm" when a user tries to change the index. Currently AutoPostBack is set to TRUE. I can, of course, just call __doPostBack from within a javascript function, etc. I tried a few things with jQuery but you have to worry about mousedown vs. click and then there is...

Jquery .Ajax error when trying to POST data in ASP.NET MVC

I am unable to access an action in my controller using .ajax. The code works on my development machine but as soon as I place it on the server it gives the error 401 Unauthorized. Here is a snippet of the code in the .aspx file... var encoded = $.toJSON(courseItem); $.ajax({ url: '<%= Url.Action("ViewCourseByID", "Home")...

\0 Being added on to string??

I have a WCF service that takes text a customer enters and passes it to a windows service. I am using jQuery to send the text to the WCF service (in json). Before passing the data I call $.trim() on the text. Today i received text with a null character in it that looked like this: 00-15-5D-0A-0B-01\0 If I go back and test, and send...

Cancel key down, press, up event in PHP javascript, C#

I want to cancel out key press event when my textarea field gets n number of characters from user. At that point i dont want user to enter any more characters. What to do? Edit: I need it to be done in javascript as well as in php ...

jquery - remove div using just classname

Hello all, I want to remove below element using javascript/jquery. <p class="classname"><a title="some title" href="#">Hello</a></p> Please note that i dont have the id of the element so how can i remove it using just the class name. Thank you. ...

jQuery Validate() special function

I'm using the jQuery validate() plugin for some forms and it goes great. The only thing is that I have an input field that requires a special validation process. Here is how it goes: The jQuery validate plugin is called in the domready for all the required fields. Here is an example for an input: <li> <label for="nome">Nome comple...

How to stop SWF inside of a jQuery UI tab from reloading

I have a SWF movie inside of a jQuery UI tab, and the problem I'm having is that the SWF gets reloaded everytime I click away from the tab onto another tab, and then click back. I can inspect the DOM and see that the div containing the SWF is still in the DOM when I click away, so I don't know why this it seems to reload it when I click ...

Google maps api v3 refreshing away markers

Hi, I am having problems with the google maps API V3. It seems that every time I load my page the maps load (including the markers) and then it does a quick reload and removes all the markers. Am I missing somehting? What am I doing wrong? Here is an example: http://www.PaulPeelen.com/wp-content/uploads/2010/04/SafariScreenSnapz001.mov...

Change Image with transition effects

Hello, I have the following script that changes my image on a timer: var da = setInterval( function() { var current_image = document.getElementById('node_picture').src; var image_index = current_image.substring(48,49); image_index++; if (image_index > 4) { image_index = 1; } document.getElementById('n...

jquery fade effect on 5 images on click

is there any jquery or any script, that when u click on one link, few images on a page change? ...

IE8 is subtracting wrong in JavaScript / jQuery?

In every browser, Win/Mac, Chrome, Safari, Firefox, Opera, IE6, and IE7 they ALL get the following console output: 352 254 But in IE8 I get: 414 434 454 474 Here is my JS/jQuery code: $('#top-breadcrumbs').children('a').each(function(i){ if(!$(this).hasClass('permanent')){ if(permItemWidth+rmItemWidth > $('#top-bread...

jQuery Datatable dynamic edit button attached to each row

totally new to jquery and datatable. I would like to add an edit button that call forth a colorbox div that displays all the editable field. can anyone point me in the right direction on how this can be achieved? I was able to add a sClass to each field and use fnDrawCallback callback to call colorbox from field. But this is kind o...

Passing a var as an argument

On a site I'm making I need to have a progress bar, I found one that suited my needs. By default it will incrementally change the color when a certain percentage is reached (0-30 red, 30-70 orange, etc). My only problem is changing them, I can set them easily with a static number such as 50, but when I try to do it dynamically (ie: 2000*...