[jQuery] How do I write this jquery expression?
Hi, I have a number of DIVs with class = "subNav". How do I write a Jquery expression to tell me the ID of the DIV with class "subNav" whose display element is not "none" (i.e. "block")? Thanks, - Dave
[jQuery] Dynamic forms and jQuery
I'm trying to create an order form where the user starts out with a single row of form inputs for entering quantity and part number. The user should be able to click the "add row" which creates the next row of form inputs. When all rows have been filled in, the the user will submit the form and the back-end PHP script will process the name / value pairs. Does anyone know of an example like this that I could learn from? Are there any jQuery plug-ins that might make working with dynamically adding
[jQuery] Encoding image upload through ajax POST
I have set up a form that uses the $.ajax function using POST. Part of my form is an image upload dialog, using the standard file upload input box. The problem is, the upload is not working, and I think it has to do with the encoding. When I upload it with ajax, it just sends through the path to the file on my local computer. But if I use normal form POST, without ajax, it will send the image contents through (I can see all the data that was sent, with ajax it is not there.) So, what I need to know
Sortable with Toggle div not working together?
I have divs that have a header with an image that toggles the content div under it. I also have the parent div set as sortable so all the child divs are sortable. Sort works great but now I can toggle the divs closed. Please help.
[jQuery] Var in through ajax, then copy to field
I have a variable that is set on another page, and then is brought through ajax into another page. On that page, I would like to copy that variable into an input field. I thought I had the code correct, but for some reason, it is not working. <script type="text/javascript"> function setImageLocation() { var imageLocation = 1234; $("#create_image_location").val() = imageLocation; } </script> Also, is there a way to copy the the value to the input field, right when it is brought in through ajax? Or
How to sort items between lists using jquery ui [Solved]
I recently switched to Jquery UI sortables and Im trying to sort items between 3 divs. I can sort them within their parent container, but i cant change thier parent. Any ideas?
[jQuery] Dragable Items - Coordinates
Say I have 5 objects that can be dragged around, I want to save their positions. Could anyone point me in the right direction? I'm looking to figure out how to get the coordinates of "object 1" and "object 2" and the id of the object then either stick them in a database or generate and xml document. Any help would be greatly appreciated.
[jQuery] workaround for IE6 clone(true) bug in jQuery 1.2.2?
I need to clone a table row, and have run into the IE6 clone(true) bug using jQuery 1.2.2. I can't upgrade to jQuery 1.2.3 just yet, so I'm wondering what the simplest workaround is? I simply want to duplicate the last row of a table. I was using the following: $('#addRow') .livequery('click', function(event) { var row = $('#contractDetails tbody tr:last'); $(row).clone(true).insertAfter(row).toggleClass('alt'); }); works great in FF, etc. Throws an error in IE6 Thanks,
[jQuery] How can I recreate this menu
I am trying to recreate this menu for a client. I have got the nav to scroll on way, but how can I make it scroll faster and slower and in a different position depending on where my mouse is on the screen? Are their any tutorials anywhere? I can't find any anywhere!
[jQuery] ajaxForm replacing content in the wrong element
I'd like to think I'm getting pretty good with ajaxForm, but apparently not. I've got a form submitting, and it is supposed to send the response to an element on the page, and leave the form in place. However, what's happening is that the form which it is submitted from is being replaced. The "loading" text goes into the correct place and the 'alert' in the success get's triggered, but the #holdBands div does not recieve the response. here's the jquery code [code] var options = { target: '#filterList',
[jQuery] Superfish: How do I have a different rollover image for each of my menu items?
Hi, Using the latest version of Superfish, I was wondering to have different rollover images for each item in the main menu. I see that there is an option "hoverClass", but the hover class will be slightly different for each item since I'm switching in a different image. Thanks, - Dave
[jQuery] Delayed Event Handlers + UI Convenience Methods
I was recently tinkering with one of the sites I manage and had an idea to use the jQuery UI preview to do some animations on the page. Out of that, I got two things I'd like to ask. I initially tweeted them, and was directed here. So here goes... First, will jQuery UI be getting convenience methods like the old Interface Elements plug-in had? Things like $().SlideToggleRight() and $().BlindToggleVertically(). I found them immensely useful, and the new API in the latest beta of UI is cumbersome and
[jQuery] Problem with Clear type and Jquery
I have a blinking tool tip that fades in and out until hover event opens it. The fade in and out images are two PNG brackets like so "[ ]" when hovered they open to "[some tip here]". Everything is alpha transparent to sit on top of graphics. My problem is with both IE6 and IE7. When the image fades in and then out a black border appears ruining the effect. Does anyone know of a solution? Benjamin Michael's solution would work but I'm not sure how to implement this on fadeIn and fadeOut. Another
[jQuery] [treeview] - async version - how do i call some js AFTER the tree has loaded some json for the first time?
I'm using the async version of the treeview plugin, which refreshes the tree with an ajax call that returns some json. This is working fine. However, the cookie-based persistence doesn't work with the async version and i'm trying to write my own. In order to do this, i'm using jQuery to monitor when the user clicks on li items in the tree, so i can pull out the ids of the expanded items to save in the cookie. For now, though, i'm just testing it with alerts: jQuery("#prop-tree li").click( function(){
[jQuery] Validate plugin doesn't work on type=file controls?
I'm trying to apply jquery.validate to a form with an input field of type file. I thought I could make it required and accept only .html files, but no matter the value of the field it always got marked as being invalid. I thought maybe my syntax was wrong in the metadata (I was using class="required accept(html)" and also tried class="required accept:html" but neither worked) so I removed the accept directive and left it as just class="required". It still marked the field as invalid even when a file
[jQuery] Can I use DWR and jQuery together?
Kind of new to both, but I am using WebSphere and Java technologies. I have used jQuery for various effects in the past and am familiar with it. DWR, new to me. Can I use both libraries in my web pages? DWR for remoting and jQuery for visual and other effects? Thanks.
[jQuery] Validate plugin again: Only submit on certain submit buttons
I have a form with two submit buttons. <input type="submit" name="submit" value="Submit form" /> <input type="submit" name="cancel" value="Cancel" /> On the server side I have a PHP script that ichecks if $_POST ['cancel'] has a value. If it doesn't then it runs through the form submit process. If it does have a value then it simply redirects to another page without processing the form. My problem is that if my form isn't valid then the validate plugin won't let me click the cancel button. it insists
[jQuery] .prevAll().remove not working in FF3 b5
I'm attempting to remove three elements from a table cell upon clicking on the the last element in the cell, using the following code $(".available > .delete").click(function(){ //alert($(this).prevAll().andSelf().length); $(this).prevAll().andSelf().remove(); }); This fails in Firefox 3b5. Length reports correctly as 3 but the removal does not happen. Appears to work correctly in IE6, have not tested in IE7, etc. Any chance this is a bug that I need to file, or am I just doing something completely
[jQuery] Defining regular expressions with # selector ??
Is it possible to define a regex with a # selector that will allow select multible idies. For example i want to select tags with idies those start with "div1." or some idies with more complexed match that can be find through a regexp expression
[jQuery] Flash Video and Thickbox grouping
I have a personal family photos website that I build using jQuery. I'm attempting to use Thickbox to display some Flash Video (.flv) files along with the photos. I was able to get Thickbox to display the video and sort of group it with the others. The video comes first in the listing, so the first photo is listed as being #2. However, the video isn't showing the next link to move from the video to the next item (the first photo). I even tried changing the video to a simple "Hello World" and it doesn't
[jQuery] [treeview] Does anyone know of a persistence mechanism for the asynchronous version of the treeview plugin?
I'm trying to write my own cookie-based persistence method for the asynch version of the Treeview plugin, and am running into some difficulties. Has anyone else done this please, or know of an existing solution? thanks max
[jQuery] signal & wait
Hi experts After seeing some really nasty cool stool over on http://dean.edwards.name/weblog/2006/06/again/, I decided to reimplement some code on a hobby site. The original code makes sure that various external pieces of Javascript is executed in the correct order, and also hooks window.onload in various places. Events are inherently not a good solution to the problem, because events work by a "fire-and-forget" design. Once an event has fired, scripts that were by chance not loaded at the time will
[jQuery] JQuery Validator OR Operater
Hello Everyone, I've done some searching and am unable to find information on using an OR operator in the JQuery Validator plugin. I have two fields (for sake of argument) and before the form is valid at least one field must be filled in. They are nameFirst and nameLast. There may be a simple answer to this but I am just lost. I am competent enough with the Validator plugin to setup comparison rules, length rules, etc. just haven't been able find any OR operator information yet. Any help is greatly
[jQuery] Superfish Plugin - transparency
In addition to my other question about Superfish I am also interested to know whether there is a way of making the submenus semi- transparent? If so how would I implement this in menu system where the background image of the "a" tag determines the colour of the background of the menu. Once again, thanks for any help.
[jQuery] jquery / thickbox weirdness with apache logs(!)
Hello everyone. I'm using jquery 1.2.3 along with some plugins, and i've never had any problems or errors with any browsers i've tested. However i'm seen some really strange messages in the apache access log, and i was wondering if anyone else has run into this. 69.146.52.9 - - [29/Apr/2008:01:31:13 +0000] "GET /js/jquery/plugins/ \"+urlNoQuery[0]+\"/js/js/js/js/js/js/js/js/js/js/js/js/js/js/js/js/ jquery/plugins/js/js/jquery/jquery-1.2.3.min.js HTTP/1.1" 404 13786 "-" "Mozilla/4.0 (compatible; MSIE
[jQuery] Why is nothing working in IE6?
Even simple .hide(); does not seem to be working! I have the latest version of jQuery and every piece of my code seems to work perfectly in FF. I spent a day of development getting the jQuery below down to about 10 lines only to find the next day that it doesn't work in IE6. Here's a sample: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:// www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html;
[jQuery] New object based on existing / Or understanding $.extend
Stretching my grasp of JavaScript here... Please view source of this for context: http://static.fusion.com.au/ollie/jquery/extend/test.html $.fn.test = function() { // Creating what I thought was a new object var dupe = $.extend({},$.fn.test.orig); // Adding item to array in my 'new' object dupe.list.push('item'); // Success console.log(dupe.list); // but... I didn’t intend to add the list item to my original console.log($.fn.test.orig.list);
[jQuery] In liferay when using jquery tab it renders the whole page
Hi, I try to use jquery in liferay portlet through spring web-flow action. It renders the whole page inside the tab instead of the particular jsp content. How shall I solve this problem. Please help me Thanks in advance The code is <%@ taglib prefix="portlet" uri="http://java.sun.com/portlet"%> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Sample for tab implementation</title> <link rel="stylesheet" type="text/css"
[jQuery] Assinging the A:visted tag a class
I am trying to assign a tags in a DIV a class when they are clicked and and visited and remove the class when another tag in the DIV is clicked, I tried this t activate the tag: $('#right a').focus(function(){ $(this).addClass('current') }); This assigns all the a tags in the "right" div the clas 'current' but only when clicked on, can anyone give me a clue? Thanks
[jQuery] jquery.validate class toggling
I'm looking into various form validating libraries and one of the ones I'm considering is jquery.validate. It appears at first glance to be very flexible, but its documentation is a bit overwhelming at first glance! In my forms I'm using the following structure for fields and associated text. <li> <label for="foo"> Some text describing the field here <span class="errormsg">Hidden error message goes here</span> </label> <input name="foo" /> </li> I've got css that looks like this: li label span.errormsg
[jQuery] instanciate Jcarousel after a setimeout()
Hello, I'm trying to use jcarousel on a page where I have a first animation and text and then want to launch jcarousel. My code is : function beginTimeout () { setTimeout ('launchCarousel()',10000); } function launchCarousel() { var cadreIntro = document.getElementById ("cadrePrincipalIntro"); cadreIntro.style['display']="none"; var cadrePrincipal = document.getElementById ("cadrePrincipal"); cadrePrincipal.style['display']="block"; var bandeauProduits = document.getElementById
[jQuery] Problem with IE6/7 show/hide and relative positioned elements below
I have a test page up at: http://fox-land.co.uk/clients/test/test.html In IE6/7 the relatively positioned elements do not stay in the overall flow of the page when the elements above are hidden (the jquery code uses .hide(1000), but the same happens if you use .hide() ). This must be a problem others have experienced, but I can't find any obvious fix for this. Ideally I'd like to find a fix for this that would not require removing any show/hide effects or the relatively positioned elements. Any help
[jQuery] Scroll to the side with hover until user mouseOut
So I have a box that I want so scroll from left to right when the user hovers over a link. It will continue to scroll to the left until the user removes the mouse from the link or they hit the edge of the box/ div. Same thing to the left, but once the right is done, left shouldn't be too hard.
[jQuery] Superfish - add sfhover to an LI that doesn't contain UL
The superfish plugin, from what I can tell, only adds the sfHover class to LI's that contain a UL. Is there an easy way to have it add the sfHover class to LI's that don't contain a UL?
[jQuery] navigation driven collapsible/accordion system
I am trying to create a progressive form interface. So, say I have a 1, 2, 3 process and withing the panel I need to a have a next and previous button/link that will navigate the user from panel to panel...final panel is a submit button.. any reference(s) would be fantastic! thank you!
[jQuery] [SITE] NetFlix.com
NetFlix (http://www.netflix.com) is using jQuery Rey
[jQuery] [jqModal] How to override style properties
I've read all of the documentation on the jqModal home pages. I understand that the default CSS class jqModal looks for to style the overlay is "jqmOverlay". It appears that the only properties that it will pick up from a defined CSS style are background color and background image. I'm trying to change the modal overlay cursor from 'wait' to an external cursor file in my CSS: .jqmOverlay { background-color: #000; cursor: URL(../no_m.cur), wait; } However, the cursor style is not being applied (I
[jQuery] Tablesorter - Custom Sorts
[Tried posting this, but never saw it go through. Sorry if it duplicates] I am having a couple issues with how to sort a few of my fields. The first, and I think most difficult is I have a field which holds the value of "Empty" or lists state abbreviations. What I'd like it to do is have "Empty" be grouped together and then sort the state abbreviations in alpha. I tried the grades demo, but with no success. The second is I have an ID field which is constructed by the year and then a sequential number.
[jQuery] How do I check a parent element?
I want to check if a parent element is <h1>. How do I do that? The best I know of now is to add a class to these and test hasClass() for it.
[jQuery] animate() for background-image and/or classnames?
Hi there! Is there any chance to use animate() to animate a background-image and/ or classnames? $("#block").animate({ backgroundImage: 'url(bla.gif)' }, 1500 ); Doesn't seem to work. :( Let's say I have an element with a red background and the class 'red', I want to remove the class 'red' and add the class 'blue' so that the element get's blue.
Next Page