jquery

jquery pop up box, Pull from a database RoR

Alright. I'm working in Ruby on Rails and what I have is a table the is being pulled from a database like so. <% @businesses.each do |business|if !business.approved %> <tr> <td><div class="button<%=h business.name %>"><a href="#"><%=h business.name %></a></div></td> <td><%=h business.address %></td> <td><%=h busin...

jQuery won't replace anymore after the first time

As an easter egg for a part of one of my sites, I have in my footer #left tag a "Easter" egg that changes each time you click it, revealing funny messages: $('#left').append(" <span><a href='#' id='dontclick1'>Don't click.</a></span>"); // time for some fun $('#dontclick1').click(function() { $('#left span').html("<a href='#' id='dontc...

jQuery filter through IDs and then capture matches

Hi, I find myself doing this repeatedy. $jq("button").filter(function(){ return this.id.match(/^user_(\d+)_edit$/); }).click(function(){ var matches = this.id.match(/^user_(\d+)_edit$/); var user_id = matches[1]; alert('click on user edit button with ID ' + user_id); }); So I want to apply a click event to some butto...

Using jQuery how do I select a range of rows?

Does a jQuery only solution exist for selecting a range of rows from a table? I know 'eq', 'lt', 'gt' exist, but I'm looking for a combination of those selectors. ...

Pre-loading external files (CSS, JavaScript) for other pages

I'm curious if there is an efficient way to wait for the front page of a site to load, and then pre-load CSS and script files that I know will likely be needed for the other pages on the site. I want the front page of the site to be as fast as possible (lean and mean). It's likely that the user will not immediately click on a link. Sinc...

jQuery DatePicker causing Flicker in IE

Hi, I am using JQuery datepicker plugin and globally setting all fields with certain class name to use that ( $(".date-field").datepicker({ showOn: 'both' });) This causes the forms with a date field in them to flicker. I was wondering if anyone knows any workaround for this. thanks ...

jQuery Validation plugin minLength for checkboxes

Hello all, this is my first post here on stackoverflow and am very impressed by the site! My question is about the jQuery Validation plugin...specifically about the minLength method. I have a group of checkboxes and i want to know if at least 2 boxes were checked. http://docs.jquery.com/Plugins/Validation/Methods/minlength#length at t...

IE6 NonSecure Items

Hey all.. So I'm chasing down the non-secure item on my page. I am using the JQuery library to make an accordion menu. I suspect that the maybe the problem. Does anyone know if this href would be problematic? I can't find any blank src paths or http:. Thanks Nick ...

Why isn't my iframe editable when it is in a JQuery Dialog?

I'm trying to develop a simple management system for press releases for my company and one of the requirements for this system is that it has a wysiwyg interface for the content of the press release. The company has four websites and want to put all the press releases in one place and have the four sites pull the necessary data from ther...

Parallel asynchronous Ajax requests using jQuery

I'd like to update a page based upon the results of multiple ajax/json requests. Using jQuery, I can "chain" the callbacks, like this very simple stripped down example: $.getJSON("/values/1", function(data) { // data = {value: 1} var value_1 = data.value; $.getJSON("/values/2", function(data) { // data = {value: 42} var v...

How can I dynamically resize the jQuery Colorbox plugin?

The AJAX content loaded in a Colorbox has some JavaScript included that resizes things within the content. Colorbox determines its sizing based on the sizes before all of the AJAX happens. How can I make the Colorbox resize after the content has been loaded? Here is a link where someone said that you can call colorbox() again after it's...

jQuery doesn't get loaded in client's office

I have a strange problem that is only happening in a single location. I am using jQuery and my page is working fine in my machine as well as in other locations. In a single location the page isn't working. I shamelessly asked the client to use Firefox and install Firebug and I am surprised to find that a "jQuery is not a function" error ...

Delayed DOM update in IE6 using jQuery

I'm wrestling with a ridiculous problem in IE6. I render a page full of data on the server-side, and then iterate through the results (rows of an HTML table) on the client side, updating each row in sequence with the results of an AJAX call on each row. (I don't want to use .each(), don't ask...) IE6 will not show anything on the client...

Fancybox jquery problem in IE6

I'm using the 'Fancybox' jquery script to open some videos in a lightbox. It's working fine in all browsers except for IE6. The lightbox opens but then the video won't load. Here's the link to the page - http://www.bevelite.com.au/sky-glass-videos Please help! ...

How to let resize vertically a DIV with only jQuery - no plugins?

Edit: I put this snippet of code in jsbin: http://jsbin.com/eneru I am trying to let the user resize (only vertically) a DIV element with jQuery. I read about jQuery UI, I tried it, and in some minutes, I had it working. But the library is adding a ~25KB overhead that I would like to avoid, since I only want simple vertical resizing. ...

HTML how to move through columns

Hi, I have the following code: $(document).ready(function() { var id = 'cbx'; var idPrefix = 'Arrow'; var html = '<img .../>'; // query parent row var rowq = $('#' + id); if (rowq.length < 1) { rowq = $('.' + id); VersionHeader = true; ...

jQuery .Noconflict Issue

Hi Guys, I have a problem that I just cannot resolve and its driving me insane. I am using the jQuery library and I am using ".noconflict". I am trying to use this on my blog with the following script - http://www.internetmarketingmonitor.org/word-press-plugins/imm-glossary-wordpress-plugin The problem is - I keep getting the follow...

jQuery return false weird behavior

I have a piece of jQuery code that toggles a description paragraph for a given td when users click on an anchor tag, see code below. My problem is that if I put the return false statement as shown, the code works fine in IE but in FF it would not show the description at all, which is expected. When I put the return false after the toggl...

jQuery's .load() not working in IE - but fine in Firefox, Chrome and Safari

I'm hitting my head on the wall against this one ... I have the following code: $("#home").click(function(e) { $(".tabs").attr("src","tabs-home.gif"); $(".islice").hide('fast'); $(".islice").load("home.html"); $(".islice").show('fast'); e.preventDefault(); }); It works perfectly fine in Firefox, Safari and Chrome...

Dynamically generated radiobutton by jQuery cannot be selected in IE6

I need to dynamically generate radio or checkbox by jQuery. I use the following code: var type = "radio"; // maybe checkbox $('<input type="'+ type +'">').attr({ name: "ename", value: "1" }) However, the radio generated cannot be selected in IE6(other browsers are fine). What should I do? marcc's answer solves my proble...