jquery

jquery/validation plugin/object literals: selecting multiple checkboxes

Ok, I've tried to read up on this but I'm stumped. Unfortunately it's a case of me not understanding javascript properly. When processing a form with jqueries validation plugin, you send the variables to the php mailer using literal notation: submitHandler: function() { $.post("includes/mail-form.php", { age : $("#form-age-...

jQuery Click Table Row Toggle Section

I have the following markup (which I have no control and must remain as is, however the JavaScript can be manipulated.) http://jsbin.com/uyifu3/edit What I'm trying to accomplish is that when the table row is clicked the the "Toggle Me Here" link is automatically clicked. I keep finding my self getting into a recursive loop with the...

Select link based on partial href

Is there a selector in jQuery that will allow me to select all anchor tags that have a href beginning with href="/products/index?page="? My full href is href="/products/index?page=2", but they all have the beginning in common. ...

Carousel Type of Jquery Slide with Numbers

Hi, I have a big problem, please tell me how to do this code? That is just like the jquery header slideshow done in http://www.skype.com/ The one that has the "< 1 2 3 4 >" buttons. I just want to know the code for these buttons. If you can give samples for me to learn. Thank you!!! ...

How to get jQuery validate success function to operate on a hidden input field?

Hi all! I have a form being validated by jQuery.validate. Using errorPlacement option I have a custom set of functions for real-time error validation. Using success option I have a custom set of functions to get rid of and replace error messages. All works great except my validation on hidden fields only works on submit. With the su...

Hide button depending of if textbox has text or not with jQuery?

Hi, I have a a couple of datetime picker fields and if any of them is empty I want the Submit button to be invisible. I know how to do that but not how to make the button visible if all the datetime picker fields contains text. I've seen exmaples using keyup but when I use the datetime picker I never put my cursor in the textbox and ty...

Cakephp, dynamically write variables into css file upon load of view?

I'm working out a process to save actions that occur from jquery in my view in cakephp.. I figure an easy way to load the saved values, such as the width and height for a DIV, would be to have cakephp echo a variable as their width / height in the css file, much the same way it would do this in the view file.. I guess I'm not sure exactl...

Jquery Problem for stopping the loop

Hi guys, I got this jquery code. And this is some kind of slideshow with fading effect. So it loops... this is the first code $(document).ready(function(){ function looptour(){ $("#health").hide(); $("#billing").hide(); $("#pension").delay(6000).fadeOut(2000); $("#health").delay(6000).fadeIn(2000).del...

jQuery Cycle plugin - pause/resume weird behavior

I have a slideshow running with the awesome cycle plugin, and when you click a button in the show, I show a hidden layer on the page and send a 'pause' command to cycle. I'm having two problems: When the pause command is received, cycle immediately flips back to the 1st slide in the sequence (why??), and doesn't hit my before/after cal...

jquery colorbox looks wrong the first time opened and then fine after that

I'm trying to dynamically (using ajax) get some content and create a modal (using the colorbox plugin) with it. The problem is that the content has some images in it. I think that the modal doesn't count them in it's height or width calculation or something. So if you close the modal and then open it it looks fine. (The first time you op...

Remove all multiple spaces in Javascript and replace with single space

How can I automatically replace all multiple spaces with one single space in Javascript? I've tried with just chaining some s.replace but this doesn't seem optimal. I'm using jQuery as well in case it's a builtin functionality. ...

Where I can find jquery.param implementation code?

I would like to know where I can find the implementation code for jquery.param. ...

JQUERY - IF the element's current value ends with !!!, trigger an Alert

Given: var value = $this.text(); Where value equals: Phasellus pellentesque metus in nulla. Praesent euismod scelerisque diam. Morbi erat turpis, lobortis in, consequat nec, lacinia sed, enim. Curabitur nisl nisl, consectetuer ac, eleifend a, condimentum vel, sem. When the user types in: Where value equals: Phasellus pellentesque me...

PHP + jQuery - How to form submit, process and redirect on success?

Hi All Stupid question (I seem to be leading all my questions with this phrase), but I was wondering if anyone out there had an elegant solution for processing forms via php and jquery and then redirects [HTML FORM] --> submits via jquery post to --> [PHP FILE] --> upon success redirects to --> [SUCCESS HTML PAGE] (and if not suc...

JSON or XML or other data format with jQuery ajax()?

For a data send, where the return data contains potential updates for hundreds of elements on a page, is XML or JSON or another data format better, for usage with jQuery's various parsing formats (invoked via ajax() success)? ...

JQuery using a loop to create new divs

Hi, I'm trying to increment through JQuery loop to fill out some HTML code with data from a JSON file. The problem is that I can't seem to figure out how to get write the divs to the HTML below one another, instead the loop increments the data over each other and finally shows the last object in the array on the screen. Here is my Java...

Facebook FB.api - just use the JSON object it sends back?

So taking a look at the API doc page here: http://developers.facebook.com/docs/reference/javascript/FB.api I'm wondering if the response received back is an HttpResponse or a JSON object. They say that they return a JSON object in the response. So since they are performing things such as response.name, etc. does it mean we don't need...

Is there a way to update the dom without effecting the Mouse Cursor?

For example, I'm using the following function: $('body').html( function(i,html) { var arr = html.split(". "); arr[arr.length-1]="<span class='findme' >"+arr[arr.length-1]+"</span>&nbsp;"; alert(arr) return arr.join(". "); }); The problem is it moves the cursor away from where the user was typing. Has anyone else seen t...

How to Set the Select List & Radio button Values by default

Dear All I am using jquery my html code <input type="radio" name="maritalstatus" id="maritalstatus" value="single"/> single <input type="radio" name="maritalstatus" id="maritalstatus" value="married"/> Married <input type="submit" id="clicksingleactive" /> <input type="submit" id="clickmarriedactive"/> if i submit the click ...

Transform Javascript Array into delimited String

I have a Javascript string array with values like A12, B50, C105 etc. and I want to turn it into a pipe delimited string like this: A12|B50|C105... How could I do this? I'm using jQuery (in case that helps with some kind of builtin function). ...