[jQuery] [validate]
uhh accidently hit submit or something. Here is the rest of my message: THe CSS: .date { position:relative; } .date .researchFormError { left:2px !important; } The three error messages for the three date selects overlap and thus to the user it seems like one message that will only go away once all three date fields are complete! Coolness? I do have a question though, what if I have list items that are added to the DOM only if certain questions are answered true? Even though these on the fly added
[jQuery] [Validate]
The validate plugin is rocking my world. It will be all over emedtv.com (my job) pretty soon for our upcoming registration included projects. I added a couple of methods that help me out! For instance for drop downs I did this: jQuery.validator.addMethod("selectDate", function(value, element) { return this.optional(element) || ( value.indexOf("none") == -1); }, "Please enter a date."); And the JSTL/HTML is: <select id="birth-month" name="birth-month" class="selectDate" > <option value="none">Month</option>
[jQuery] [Validation] Validation event not firing consistently, using "Remember the Milk" style
This post is about the Validation plugin (http://bassistance.de/jquery- plugins/jquery-plugin-validation/). It seems that validation occurs on all fields initially, pre-submit, but not all show error state if field data is cleared. Test case: goto: http://jquery.bassistance.de/validate/demo/milk/ Fill in "First Name" field, then tab to next field. Fill in "Last Name" field, then tab to next field. Username will auto-populate. Now Shift-Tab back to "First Name" field, delete content, then tab to next
[jQuery] ajaxQueue is not a function
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"> <head> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"> <meta name=Generator content="Microsoft Word 12 (filtered medium)"> <style> <!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;} @font-face
[jQuery] slideing pics
Hi, i'd like to display e.g. 5 pics and an arrow to the right. When you click that arrow the five pics slide to the left and other 5 pics come from the right. Is there a script to do such a slide show, i'm really new to jQuery so i need a little help with it. Maybe you could also give me some links to basic tutrials and/or books! Thanks
[jQuery] JScrollPane external css linkage quirk
Linking an external layout css to my page seems to break jscrollpane intermittently in Safari only. All other browsers seem to handle the linkage fine. It happens most often when using the back button but also when going from page to page. When i leave the style in my header everything functions fine. I have left the "holder" class in the header as it was on the jscrollpane sample html. Examples: functioning: http://zanaganda.com/JA2/atelier/workingscroll.html jscrollpane not functioning when linking
[jQuery] Darker on Click
I have a <div> that is currently pink. Every time that it is clicked, I would like it to get redder until it is a dark red. I was wondering if anyone could think of an easy to implement this with jquery. I can't think of any simple solutions that don't involve storing the degrees of color in an array. Thanks! Keith
[jQuery] Troubles with bind('click') in IE <cant seem to get it right>
Hi I have been banging my head over a small piece of jQuery I have written to use for navigation. basically I am binding a click function to <li>, based on what <li> was clicked it opens its respected "animation div", then loads content I work on a mac desktop, non intel based, which I am unable to use to debug IE. I have to run to remote locations to test, then run back and attempt to fix. However the local library doesn't allow me to debug what soever, so I have ran myself into a corner! LIVE :
[jQuery] Improvement
I'm relatively new to jQuery & Javascript and was wondering if someone could help me condense my code a little. What I have going on is... multiple div's with different info in them & an ordered list of links. Only one of the divs will display at a time and they can be toggled through by clicking on the corresponding link. HTML: <div id="branding"> <div id="one"> Lorem Ipsum One </div> <div id="two"> Lorem Ipsum Two </div> <div id="three"> Lorem Ipsum Thre </div> <ol> <li><a href="/?brandingId=1">1</a></li>
[jQuery] IE problems with binding click?
I can't seem to get this right... http://danthedesignman.com/c2/html/ I am on the mac platform and can't debug IE6/7 ... can someone take a look at it quickly for me? I was told by a non code knowledgeable friend that the navigation buttons do nothing in IE Thanks!
[jQuery] Tooltip in selects
When you hover a tooltip in a select, it should disappear when you are selecting a option. In this case, the tooltip are putting the box of tip completely in wrong place. And worse: when you are hovering the option the tooltip keeps behind them, whats its strange user experience. I try to solve this problem with this code $("select").click(function(){ $.Tooltip.blocked ? $.Tooltip.blocked = false : $.Tooltip.blocked = true; $("#tooltip:hidden").length ? $("#tooltip").show() : $ ("#tooltip").hide();
[jQuery] jscroll not scrolling full page
On load my content gets cut off. But not all the time. This problem is somewhat consistent in Safari on a Mac and intermittent in FF. if you jump back and forth between the following two pages it will break. examples: http://zanaganda.com/JA2/atelier/methodology.htm http://zanaganda.com/JA2/atelier/workshops.htm I just updated and wasn't having this problem before. Any thoughts? Thanks!
Custom Menu
It seems somewhat difficult to find the menu I was looking for. I haven't come across anything that looks alike so I decided to give the forum a try. This website has a demo of a menu (doesn't work properly) which gives a good idea of what I am looking for; <a href="http://speeltuin.vervandekade.nl/index.php?page=home">http://speeltuin.vervandekade.nl/index.php?page=home</a>. Has anyone come across a menu like that one? Any help is appreciated. Thanks in advance
JQuery Slide Only Parents <solved>
Hi All Im new to JQuery and i have a wonderful menu working in the slide fashion but what i am trying to do now is when i click on one of the li's that expand i only want that ul's to expand and its parent ul's i want all other uls that are not the parents of the new ul opened to be closed if that makes since this is the code $(document).ready(function() { $("ul:not(:first)").hide(); $("ul li").click(function() { $(this).next("ul").slideToggle(); $("this.parents:not(this)").slideToggle();
[jQuery] Adding an if(condition) traversal mechanism...
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> </head> <body bgcolor="#ffffff" text="#000000"> <font face="Arial">I've been playing with this... $.fn.if = function(flag) { return (flag) ? this.pushStack( this ) : this.pushStack( [] ); }; You can then do stuff like: var addEdges = function(selector,opts) { $('.selector) .addClass('selected') .if(opts.page>1) .addClass('more-left') .end() .if(opts.page<opts.num_pages)
[jQuery] Overriding extended plugin variables
Hi all I have a plugin which has a couple of variables which can be overriden like this: $.fn.doStuff.defaults.classOdd = 'oddClass'; $.fn.doStuff.defaults.classEven = 'evenClass'; Now I have the above two lines in my $(document).ready function because those two options are used just about everywhere in my website except for one place where they should be null. The problem is that I can't seem to change back the default values of the plugin variables classOdd and classEven for that unique instance
[jQuery] How to center div horizontally + vertically?
Hi everyone, I'm wondering the best way to center a div horizontally and vertically on the fly. I have: jQuery("a").click(function () { jQuery("#box")./*verticalCenter().*/ add("#loading").show(); }); Basically I just want #box to be centered on the screen and then shown. I'm clueless as to how to do this, however. I tried using an excerpt from an older version of the Dimensions plugin that I found on here, but it seems to be outdated now (it doesn't work in Safari). Thanks!
[jQuery] Waiting for a click event...
Hi, I'm puzzling over something and would be grateful for some help... I've got four divs on the screen that I have hidden and wish to step through with each user click. So, the first div is shown... A user then clicks... The first div is then hidden and the second revealed... A user then clicks... The second div is then hidden and the third revealed... And so on... I thought I could achieve this using the following markup: <div id="no-1">Content 4</div> <div id="no-2">Content 4</div> <div id="no-3">Content
[jQuery] New site using jquery
Hi, We're lauching a new site, using jquery and lot of plugins (french site) http://www.voyagemotion.com/ Thanks to the jquery library, and the plugins authors !
[jQuery] jEditable selects - Adding/binding events?
Hey all, I have the following jEditable which allows a user to change their mood: $(".mood-selector").editable("/user/mood", { data : "{'happy':'happy','excited':'excited','lucky':'lucky','loving':'loving','selected':'<? php print $moody; ?>'}", type : "select", submit : "OK" }); This works great, however I need to bind a click/change/mouseover event to the select that's generated by jEditable, so I can show a visual description of the option the user selects. I do not know how to get this operating
[jQuery] accessing elements with "." in their ids without escaping
hello, I am in the process of moving to jQuery. One challenge is: many of the relevant IDs of Elements have one or more dots within them. I read within the FAQ that I can escape them when using the $("#some\ \.id") selector. Is there another possible way, like $().getelementbyid("#123.123") ? or is there an escaping-function allready "in the wild"? Or do I have to come up with my own escaping function? Best wishes Harald
[jQuery] MIssing cursor(caret) for <input> and <textarea>
Hi, I have a funny problem. I have several Divs showing and hiding as "inline" alerts, confirms and other forms. When showing, sometimes the inputs and the textareas do not show the blinking text cursor (the caret). Does anyobdy knows a workaround ? This is an issue not just w/ jQuery but w/ YUI too.
[jQuery] load function with selector question... script removal
If you use the load function without a selector it will parse and fire any <script> tags contained within it. But if you use the new selector option to only pull out part of the remote document, all <script> tags are parsed out. The jQuery code at line 2441 says the following: // inject the contents of the document in, removing the scripts // to avoid any 'Permission Denied' errors in IE My question is why is there a difference between loading the whole remote document vs only part? Why does IE have
[jQuery] IE re-applies percentage widths on each event.
Hi all, I'm trying to finish up a little plugin to create a sortable combo- select input from a single select input. It works great in Firefox, Safari, and Opera, but in IE (any version), every time you move an option, the select inputs decrease in width, until they completely disappear. It looks like maybe it's re-applying the percentage width within the current width each time. This seems really odd to me since I'm not manipulating the styles of these elements in any way. If I switch to fixed pixel
[jQuery] Using a button that doesn't submit?
Hi, all... I'm using some jQuery to add file fields to a page. I'm using a button to trigger the jQuery. <button>Add New Image Field</button> In IE6 and IE7 the button just adds fields like I want, however, in FF2, the button submits the form. How can I use the button with form submission? I found plenty of info on Google about submitting a form without a button, nothing on using a button in a form with causing submission... Rick
[jQuery] Can't grab text element
I have a web page that renders radio buttons with text after it. I want to take that text and wrap a label tag around it but I can't grab the text. Here is the HTML: <input type="radio" name="RadioField" type="hidden" value="Y">Yes <input type="radio" name="RadioField" type="hidden" value="N">No I can get the radio object and I can get an array the radio objects siblings using ("#radio").each( function(){ $(this).siblings ). I can't get the first sibling that's a text node. I've tried $ (this).siblings("[nodeType=3]")
[jQuery] jQuery Newbie - Getting value of a Select Option
I'm a complete newbie to jQuery trying to perform a relatively simple task, but can't figure it out. Based of the value of a select option, I want to hide/show a div. How do I get the value of the select option? Here's what I have below. Thanks for your help! $(document).ready(function(){ var hearOther = $("#hear_other"); hearOther.hide(); $("#hear").change(function(){ if( $("#hear_other option[value='O']")){ alert('show hearOther'); }else{ alert('hide
[jQuery] grep with new version of jQuery 1.2.3
Here's a line of code that I had written that worked great with version 1.2.1: $.grep(priceBreaks, 'a > quantity', true) How might I write this so that it works with version 1.2.3?
[jQuery] Problems getting timing of commands to happen correctly
Hi everyone, I have been trying to use jQuery to create a relatively simple image rotator. The challenge I ran into with this script is that I want the new image to fade-in over top of the existing image. After many different attempts, I was able to get "pretty close" by using the following (unelegant) code: i++; bg++; if (i == (numImages + 1)) { i = i - numImages; } if (bg == (numImages +1 )) { bg = bg - numImages; } bgImg = "url(/images/stories/js_images_home/header_" + bg + ".jpg)"; img = '<img
[jQuery] Combine two jQuery objects
Hello all, I have the following code (which does not work).... var childElmts; if (prntElmtID == 'P30_DESKTOP') { childElmts = $ ("#P30_DESKTOP_ADD,label[for='P30_DESKTOP_ADD']"); } else { childElmts = $ ("#P30_LAPTOP_ADD,label[for='P30_LAPTOP_ADD']"); childElmts += $("#P30_LT_OPTIONS").parent("td").children(); } How can I accomplish what I'm trying to do in the else block? Dan
[jQuery] Superfish Plugin - Animation onmouseout
I'm currently working on a project which requires drop down menus. For this I am using the excellent Superfish plugin. I have, however come across a problem. When the sub-menu appears it appears with the animation: opacity:"show", height:"show" however there does not seem to be an option to have similar anmations for when the menu dissapears. It just dissappears rather than fading out gracefully. Does anyone know of anyway I could achieve this fading-out when the menu dissappears? Thanks for any
[jQuery] div X, Y Location
Is there an easy way to find the current X, Y location of any div area? Example of what I am trying to find: $(this).xpage or $("#mainDiv").ypage Those currently returns undefined. What am I missing? Thanks.
[jQuery] Need help with a toggle - works if I click twice!
My code: <div class="categorytitle">Health Status or Disease</div> <div class="topiccount"> 54 Topics <span class="clicktoview">- Click To View</span> </div> </div> <div class="topiclist"> <div class="twocols"> <ul> <li style="display: list-item;" class="checkboxline"> <input class="check" value="1" name="topicid" id="topic_1" type="checkbox"> <label class="label" for="topic_1">Acute Lung Injury</label> </li> <li
[jQuery] innerHTML from ajax req in IE
Using $load/get/ajax and innerHTML= or $().html for setting the content of the tab div tag works everywhere except IE6 (haven't tested IE7 as only ie6 is allowed on our boxes). The content works fine when inserted into the page with tiles before it is sent to the browser, but when the content page is switched using tabs with ajax, the content is returned from the server properly, but gets ruined when it is inserted into the dom. The tags are converted to uppercase, some double quotes are ignored,
Reducing code - array?
Hi, Maybe you can help me to reduce the code of a simple hover func. I have a link on a graphical bar. When I hover over it, it should change the background of the bar. As I have 7 different categories, the code is getting long. So, perhaps there is a chance to shrink it a little bit: $("a.message_overview").hover( function() { $('div.overview').css({backgroundPosition: '0 -88px'}); }, function () { $('div.overview').css({backgroundPosition:"0
[jQuery] Testing to see if a checkbox is checked
All, Hello all. I'm having an issue with an application that was working previously. I have some checkboxes which I use to hide/show other items on the page. I was using the following code to achieve this... if (jPrnt.attr("checked")) { actionLabelElmt.show("normal"); actionElmt.show("normal"); } else { actionLabelElmt.hide("normal"); actionElmt.hide("normal"); actionElmt.attr("value", '-1'); } This is no longer working... Any ideas on how to see if a checkbox is checked or unchecked after a page
[jQuery] innerHTML ($().html) in IE6
Doing tabs with ajax requests. The issue is that the formatting gets all screwed up in IE6 when its inserted into the DOM. This seems to happen with $.load, $.get, and even $.ajax and setting with getDocbyId and innerHTML = tabContent. The content is returned properly, but after the insert I get uppercase tags and other artifacts. Things such as <LI class="" jQuery12063582151="47"> and the whitespace is all screwed up... This causes the page to fall apart. (we have to use XHTML strict). Any help/workaround
[jQuery] CSS dynamic loading
Hi guys! Can someone tell me if there're any posibility to backtrace loading of a stylesheet with jQuery? $(<link />).attr({href:'',type:''})[0].onload=myfunc() would be nice, but it doesn't work =/ $(document).ready() is misfits, cause css is pasting dynamically after page was loaded.
[jQuery] Problems with form plugin + response xml + tickbox
When I put the data of the form, it returns an XML if the information does not pass the validation. If the data is correct the response type is HTML. I'm using the Tickbox plugin to show this form. The problem is that if the response type is XML, i can't to call the success method of the Form plugin to manipulate the response. Someone could help me in this problem? Thanks
[jQuery] slideDown for a <tr> ignores the colspan
I'm having problems using slideDown for a TR that contains a TD with a colspan of 5 Basically my code looks like this: <tr> <td> stuff </td> <td> stuff </td> <td> stuff </td> </tr> <tr id="expandme" style="display:none"> <td colspan="3"> stuff </td> </tr> My script tries to run slideDown on "expandme" but instead of having a colspan of 3 the td acts as a colspan of 1, and everything gets squished together. Any suggestions?
Next Page