jquery

jquery exec() function

I have the following $().ready(function() { $("input[name^=totalRent_]").each(function() { var input = $(this); var name = input.attr('name'); var num = /\d+$/.exec(name)[0]; My html form has: <input type="text" name="totalRent_1" value="" /> <br /> <input type="hidden" name="totalRent_1_hid...

Jquery: Why am I getting an OPTIONS request insted of a GET request?

With this code http://paulisageek.com/tmp/options.html : <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js" type="text/javascript"></script> <script> $.get("http://metaward.com/import/http://metaward.com/u/ptarjan", function(data) { alert(data); }); </script> in Firefox 3.5 on Vista it does an OPTIONS requ...

CSS, z-order, & a jQuery mini-menu

I am trying to implement a very simple little dropdown-style mini-menu that will appear when a website user hovers over an image. The image is a link to download something and the mini-menu will give them a choice of format (flat file vs. chart). The markup: <style> ol, ul { list-style: none; } .dow...

How to get character coordinate in a text block?

In a block of a monospace text, is there a javascript snippet or JQuery plugin that gets coordinate (row & col of text, not pageX & pageY) of the character under mouse cursor and highlight the character? ...

Rails or Jquery WYSIWYG

I'm pretty much just looking for the code they used that is very similar this this WYSIWYG when adding a comment. I want them to be able to hit return and it automatically throws in a <br /> tag. I know very simple way to get it to work in a text area if they know the HTML tags, but almost no users will. So I just want a few buttons li...

Re-using a function jquery?

I Have this function, I would like to use the same function for 3 other sections on the same page. I have tried putting "this" and closest but it doesn't work correctly. Any thoughts? I have a UL with a class of "contain" I have also wrapped each section into it's own div of "subSet" so it becomes the "parent". //Sign Up Favorites F...

Jquery Innerfade Not appearing correctly in ie 7 and below

Im building a website with a jquery header that fades one picture into the next (as you have all seen before). Take a look at a sample page here: http://hqinternetsolutions.com/fullservice/index.html In IE6, the images shift way over to the right creating a margin. I figured out what is causing it. In the jquery.innerfade.js file, the...

jQuery: Getting the two last list items?

I want to apply a special class to the two last list items in an unordered list with jQuery. Like this: <ul> <li>Lorem</li> <li>ipsum</li> <li>dolor</li> <li class="special">sit</li> <li class="special">amet</li> </ul> How to? Should I use :eq somehow? Thanks in advance Pontus ...

getJSON fails, JSON validates

I have a getJSON call which is inexplicably failing. The idea is, you click to submit a comment, a URL gets hit which determines if the comment is OK or has naughty words in it. The response is given in JSON form. Here's the paired down JS that generates the call. The comment and the URL are already on the page, it grabs them and hits t...

How to manipulate ajax loaded content?

Hello! I'm loading external page via jquery.ajax: $("#mydiv").load("filter.html"); content of example.html: <div id="filterdiv"><input id="filter" name="filter" size="40"/></div> then I want to manipulate input#filter, so I wrote in javascript: $('#filterdiv input').focus(function(){ alert(Hello); } and nothing happens. If ...

JavaScript: Know when an image is fully loaded

If I have a beacon: <img src="http://example.com/beacon" /> I want a method to be called once the beacon request finishes. Something like: <script> $("img.beacon").load(function() { // do stuff knowing the beacon is done }); </script> Is it possible? Is it in jQuery? ...

Using facebook connect with Jquery

Is it possible to use Facebook connect with Jquery? I've found some old posts saying it isn't possible, but I'm not sure how things currently are. I've found that the Facebook connect code is mostly using Fb as the namespace, while jquery uses the $ sign, so may be it is possible? ...

jQuery name problem

Hi, i have a problem trying to validate something. I hope you can help me! IM USING STRUTS2 "currentTarjeta.causaDeUnicoServicioContratado": { required: "#currentTarjeta.causaDeUnicoServicioContratado:checked", i need to validate input "currentTarjeta.causaDeUnicoServicioContratado" when is checked the check "currentTarjeta.causaDeUni...

One JS app Overwriting Another.

Forgive me as I ask what is wrong with my JS. I am really new to all of this. I've been redesigning my portfolio site and have hit a wall trying to put two different JavaScript applications together. I want my site to be just one page and use JS to view all the content. In order to do this I am using two different Jquery apps. This a...

Jquery Webapplications

Hello I read now a few days here and i learn a lot of things. Now i want to ask you, if you know web based applications, which uses jQuery. At the Moment i have only one example: http://gantter.com/ My special interests are webapplications not websites. I know the technologies are the same - but the view is totally diffrent. I hope to...

jquery with boxy plugin - load and submit a form via ajax

I am using JQuery with Boxy plugin. When a user clicks on a link on one page, I call Boxy.load to load a form onto the pop-up. The form loads and is displayed inside the pop-up without problems. However, I can't bind the form to a submit event, since I can't select the form element. This is the event handler: $('#flag-link a.unf...

Simple jquery ajax response on error

A couple of questions, first with this var string below, the 1 one works but I need to get the second one working, there is a snytax error because I am not sure how to write it var string = 'id='+ id ; var string = 'id='+ id 'USER=1'; Second; This ajax call below, it post to delete.php to delete a comment, it works but I would like to...

Prototype, dojo or jQuery?

I am new here. If this is already asked, please delete it. Which one would you choose? ...

Page not updating during busy javascript code.

Hi, I have a pretty long javascript script. The problem is that in the middle of it I want to change a div's innerHtml to say "almost done please wait". I think the issue is that I call a jquery function. The in the success callback of the function I call another function which is where I am trying to update the page from. If I set a br...

How to deal with jquery ajax comments and captcha

I am working on a comment system on a social network, I am using jquery, I can post the comments with ajax with no problem but sometimes I need a user to submit a captcha form if they are posting too many comments or for other reasons. I think the best way to do this is to add it into the current comment posting part, if the php scri...