[jQuery] [validate] one form multiple validations
In the validation plugin I am using rules and messages to validate a one form which is broken up into multiple steps within the one form. Similar to this script http://jquery.bassistance.de/validate/demo/multipart/ but altered to add custom rules and messages. Here is what I have so far. $(document).ready(function() { var v = $('#form').validate({ errorPlacement: function(error, element) { error.appendTo(element.parent('div').next('div')); }, rules: { //
[jQuery] Only show div's within parent.
This is my first time with jQuery! I have a list like this: <ul id="results"> <li> <a href="#" class="show">some text</a> <div class="hidden">some text</div> </li> <li> <a href="#" class="show">some text</a> <div class="hidden">some text</div> </li> <li> <a href="#" class="show">some text</a> <div class="hidden">some text</div> </li> </ul> And a script like this: $(document).ready(function(){ $("a.show").click(function ()
[jQuery] Multiple Rows in Jcarousel
I was wondering if there was a way to get Jcarousel to slide through multiple rows of images horizontally.
[jQuery] ANNOUNCE : 'constrain' plugin for numeric, alpha , etc on text boxes
I needed to be able to specify constraints on text boxes specifically but simply so I wrote jquery.constrain.js. This lets you specify patterns (regexs) , limit characters to a certain quantity,or just prohibit characters on text boxes . Also includes an numeric extension so you can pass number formats in string form. Project page is here: http://plugins.jquery.com/project/constrain mike
[jQuery] invalid object initializer
Hello, I'm very in-experienced in javascript, this is my second javascript / jQuery experiment. I was wondering if someone could tell me what I'm doing wrong: I have the following code if ( \$(e.target).is('.legacy_view') ){ \$("#loading").toggle(); var thequery = \$("#legacy_data").val(); alert (thequery); \$("#query").load("/mysite/thepage.pl", {thequery}, function(){ \$("#loading").toggle(); }); thequery is data the looks like this: "Value1:
[jQuery] whats wrong with this selector ?
Hi All, In the following code, I expect the document to pop a message box saying 'para1' upon load. However it doesn't seem to work. I am trying to select a 'p' element that has a link in it. What do u think is wrong ? -- <html> <head> <script type="text/javascript" src="starterkit/jquery-1.2.6.js"></ script> <script type="text/javascript"> $(document).ready(function() { $("p[a]").each(function() { alert(this.id) });
[jQuery] Ultra simple question: Plugin callback
Hey there! Consider this code: $.fn.toggleAnim1 = function(f){ this.animate({'opacity': 'toggle', 'height': 'toggle'}, 'slow', function() { return f; }); } $('#success').toggleAnim1(function() { alert('hizzzzzzzzzzzzzz'); }); Is that one way to provide callback functionality? I would love some pro advice. :) Thanks in advance! Cheers, Micky
[jQuery] Possible animate (negative) bug w/ Firefox 2
I am experiencing a problem with Firefox 2 and jQuery 1.2.6. I am doing a basic slide using the $.animate into negative territory. The animation jumps to the positive value quickly before resting at the correct negative value. The larger the negative value, the larger the positive swing. This is only an issue of FF2 PC. It seems to work fine in all other browsers FF3 Mac/PC, IE6, IE7, Safari 2, Safari 3 This is how I'm calling it: $("#myTab").animate({ botttom:"-100px" }, 300) Any suggestions appreciated.
[jQuery] Double-click and toggle
Hello, I've been trying to figure out how to combine double-click and toggle but haven't had any luck. Here's what I have so far: $("li").dblclick(function() { $(this).toggle(function() { $(this).doSomething(); }, function() { $(this).backToNormal(); }); }); Any ideas why this doesn't work?
[jQuery] curcss error with resizables.. odd situation though
Hello jQuery, I'm working on a t-shirt design module with jQuery. Check it out here: http://84.86.134.134/shirt/ No worries, it's my home development server. Nothing bad happenin'. ;) This is how to produce the error in Firefox 3 (and I suspect in other browsers too): 1) Switch to the backside of the shirt by clicking the "Achterkant" tab in the top left. 2) Drag the image on the right onto the t-shirts canvas area (marked with a dotted border). 3) Click on the button "Transformeren" which is found
[jQuery] Superfish sub nav links disappearing on refresh
Hi I have set up the 1.4.8 release of Superfish Nav Bar style. Everything works fine except that when I click on a subnav link, the links disappear when page is refreshed. When I hover over main link, they reappear only to disappear again. With JS off, this is not an issue. Any help with this? Thanks for the great nav. Dave
[jQuery] temporarily disable ajaxSend?
In order to prevent a clash between a java applet and jquery, i need to disable the ajaxSend trigger for a certain ajax call. How do i do that?
[jQuery] forgotten bug? java clashes with jquery, by design, at least since 1.2.1
Whenever one uses jquery on a page with a java applet, either with <object> or <embed>, there are CRIPPLING ERRORS on many operations (that are executed in the background). There's already a bugticket for it, but it hasnt been updated in a while: http://dev.jquery.com/ticket/2349 (lists causes and non-working workarounds) it's mentioned on google a couple of times too; http://www.google.nl/search?q=%22has+no+public+field+or+method+named+%22jQuery&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-GB:official&client=firefox-a
[jQuery] ToolTip Bassistance insert external information
Hello. I want to know if it is possible to insert external information in the tooltip, for example, from XML. I that by means of the function of jQuery "$get" or "$post" I can read a file XML or part of he, of the following way. $.get ("data.xml", function (xml) { … } How to implement it with the tooltip? Can someone of you orientate me or to give me some idea? Thank you very much. P.D.: Forgive my horrible english language.
[jQuery] SimpleModal wierdness
Hi folks.. I can't fathom this out. I have an image which looks like this: <img src="/images/commoncraft.jpg" class="signup floatleft" /> and a bit of javascript with simplemodal that looks like this: $(document).ready(function () { $('.signup').click(function (e) { e.preventDefault(); $('#modalwikivideo').modal(); }); }); The problem is it works fine in safari, firefox but Not IE. On clicking the image, IE gives the rather unuseful error: Object doesn't support this property or method
[jQuery] TurningOff Timestamp in querystring for AutoComplete
Hi, I am using the RC2 version of AutoComplete, But it seems there is no way to exclue the timestamp parameter from query string. The problem with timestamp is, it does not reuses the browser cache, though it maintains a cache which is no good for consequent visit. Can an extera setting can be added in the options, so that we can remove it from the querystring. Thanks.
[jQuery] jQuery.getJSON ajax loading
Hi, I need to add ajax loading before jQuery.getJSON loaded ... because on some user, the connection was pretty slow and they needs to wait for several seconds... please tell me how to add ajax loading message (i will supply with the image and overlay div) before getJSON loaded and after getJSON finished. thanks
[jQuery] .serialize and form elements in tables
<html> <body> Hello folks, I've been successfully using .serialize() to prepare input data when my form has the structure <tt><form id="processthis"><label for="d1">Your name</label><input id="d1" type="text" name="dStartDate"> etc... </form> </tt>However, if the input elements are enclosed within a table structure within the form, like so ... <tt><form id="processthis"><table><tr><td><label for="d1">Your name</label><input id="d1" type="text" name="dStartDate"></td></tr> etc.. </table></form>
Ajax Forms and PHP
Hi guys. I have created an ajax form script. That means, if you send a form, the page is not reloaded. The form data is sent through an ajax request. My javascript does this: - traversing through the form and creating an array with the form data. - sending an $.post request with the created array as data On the other side an php script handles the data. And here is my problem. The script must work exacly how the browser sends its form data: Content of php $_POST: array(4) { ["name"]=> string(0)
How can I traverse a HTML doc to get an specific input item?
Hello, I am new to JQuery and I am having problems to traverse a HTML document. What I want to accomplish is to get an <input> element with id = h that is inside a <div>. This input element is part of a <FORM> element. So far I have tried the following jqueries without success: 1. - $("form#frmSceneData > div.frmRowOuter").children("div.frmRowField") .show().html() 2.- $("form#frmSceneData").find ("div.frmRowField") .show().html() Applying the following jquery I am getting part of what I want. The
[jQuery] hover question
This isn't so much about hover, but about the selectors I've had to use within its 'over' and 'out' functions. Consider the following. I'm working on a project where I'll have to repeat this pattern often. I'll hover over a table's tbody, but will need to affect rows or even specific row cells within that tbody. // This will highlight a tbody's rows on mouseEnter. // The original row coloring will be restored on mouseLeave. // A tbody may have numerous rows. tbody.hover(function () { $(this).children('tr').addClass('hovered');
[jQuery] star ratings performance
I'm having serious performance issues with the star ratings plugin. It's specifically related to using the split:4 option on a page with ten different ratings. I'm looking through the code to find the problem, but if anyone knows anything, I'd appreciate the info. Thanks, Chad
[jQuery] Multiple Carousels Controlled Simultaneously by one set of Prev/Next buttons
Does anyone know of an easy way to do this? I know jcarousellite can, but I need the extra functionality that jCarousel offers. Thanks in advance! Sorry if this was already posted.. i couldn't find it.
[jQuery] NEW PLUGIN (beta): ContextMenu
I've been working on a new Context Menu plugin. I know some exist, and I've used them, but I've always wanted something better. Here is mine: http://www.javascripttoolbox.com/lib/contextmenu/ This is at a pre-beta stage right now. Not ready to be used, but I would love to hear what people think. I still need to finish the examples, write some more documentation, and package it up a little better. I expect to have it at "Version 1.0" in a few days. Hopefully the examples on that page will show you
[jQuery] jQuery Cycle Lite Plugin
Hi, I've spent hours but couldn't make it work. I don't know what I'm missing. Can you please check http://www.chorka.com/jquery/jquery.html and comment? Regards, Sultan Arefin
[jQuery] Trigger Dom Event
I'm having problems with jQuery events and event delegation. I've got a table with multiple rows and a click event registered on the tbody of that table. I'm trying to programmatically "click" a cell so that the event will bubble up to the tbody click event with the correct target. I've tried both the click() and trigger('click') and neither seem to fire off a dom event due to the fact that I don't have a jquery registered click event on the cell. I then tried registering a one time click event on
[jQuery] jQuery and Browser CPU Usage
Hi, I have a site I've recently built that makes heavy use of jQuery. One thing I've noticed since moving to the production server is that when one of the website pages is open in a browser (Safari, IE, Firefox, Camino, or Opera), the CPU usage spikes and continues to run high even after the page is fully loaded. For example, Firefox, with the site's homepage open, will use 40-50% of my CPU (according to Activity Monitor on my Mac or Task Manager on my PC). If I close the page (Firefox or other browser
[jQuery] get parent element text while excluding child element text
Is there a more elegant, concise, pure jQuery approach to doing the following?... HTML: <p id="test">paragraph_text<span>span_text</span> JAVASCRIPT: var p_txt = $('#test').text().substring(0, ($('#test').text().length - $('#test span').text().length)); alert(p_txt); OUTPUT: paragraph_text
[jQuery] jCarousel vertical scrolling cut off images in Safari
I have a site that I'm using the vertical scrolling jcarousel with. . It works right on initial load, however each carousel image link loads a different but similar page. Clicking between the pages and scrolling results in a cut off images on the 2nd or 3rd scrolled section.. this problem only occurs in SAFARI. I wanted to have each image link load just the external HTML content using innerhtml but because that area to the left is an SWF it doesnt play nicely. If someone can suggest how to call different
[jQuery] List overload
I just want to point out that this list is so active that I simply can't keep up. I wonder if splitting the list into two or more lists based on some criteria would be advisable. Just a thought, trans.
[jQuery] 2 or more ac in one page by 1 ac function
hi all, is that possible to handle 2 or more ac in one page by 1 ac function ? how to complete it .... $("#ac_box" + x1).autocomplete("ac.php", { .. extraParams: { main: $("#x1").val(); ac.php------------ select * from db where xxx='$_GET["main"]' and yyy=$_GET["q"] thanks
[jQuery] Adding select option values to hidden field
Hi all - I have a a table within a form which holds rows with a dropdown list in each. After the options have been selected, I need to add those to a hidden input field with the values separated by a comma. This is what I currently have which works when there's only one table row but not multiple. The user has the ability to add new rows to the table dynamically but I've left that out of this code for simplicity. Can anyone help? <script type="text/javascript"> $(document).ready(function($) { var
[jQuery] tablesorter wrong ordering
I have installed the tablesorter plugin. I use the following code to initialize it: <script type="text/javascript"> $(document).ready(function() { $(".tablesorter").tablesorter( {sortList: [[1,0]]} ); } ); </script> So it is going to sort the second field ("Navn"). But when I click "Antall", 120 comes under 1102. Why? See attachment http://www.nabble.com/file/p19796169/tablesorter.JPG tablesorter.JPG -- View this message in context: http://www.nabble.com/tablesorter-wrong-ordering-tp19796169s27240p19796169.html
[jQuery] Bug with JQuery is?
If it's not a bug it is at least violates the principle of least surprise. The .is function returns true for things I don't think it should. See the example below. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:// www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>bug?</title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/ libs/jquery/1.2.6/jquery.js"></script> <script type="text/javascript"> function
[jQuery] livequery strange behaviour
Hello all: I've recently discovered livequery plugin, but I can't make it work. I explain: I have the next code: $(document).ready(function (){ alert ("executing jquery"); $("div[@roundedCorners]").livequery(function(){ alert("hey, one div wanna be rounded!"); ${this}.rounded(); }); }); ...and it doesn't work. Neither the first alert nor the second one is invoked. But if I drop the line: ${this}.rounded(); ...the two alerts go fine. I thought that the problem was in the corners
[jQuery] ready function does not fire in Opera when the Back button is used
The ready function does not fire when you hit the Back button in Opera (tested in Opera 9.52 Windows XP). It does fire in FF3, IE7, and Safari. Example: <html> <head> <meta http-equiv="expires" content="0"> <script src="jquery.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready( function(){ alert('test'); } ); </script> </head> <body> <h1>Test of the page load event and the Back button using jQuery</h1> </body> </html> Create a web page that is using this example
[jQuery] Return Object + Wrapper
I've got a bit of a problem. I'm attempting to wrap an element, and then retrieve the element + the new element added on wrap. For example: $("element").wrap("div"); The wrap function will return $("element") again, but what if I want to include the div I just wrapped around $("element") into a new Jquery object? The html used in the wrap() function is dynamic, it can be anything, so I can't just select it by doing $("div element") after the wrap. Any advice on the matter is *greatly* appreciated.
[jQuery] how to use Current of superfish
after all (with big help of Joel) I managed to setup my menu. since i wanted it the way that the background and the font color change when hovering the menu items i know encounter another problem for setting the current menu. the current class doesnt not work. so i decided to use my own way of setting a current menu. (maybe quit helpful so i do post it) 1. put <body id="home"> and <body id="about"> in the html files 2. <a href="index.html" class="home">Home</a> <a href="about.html" class="about">about</a>
[jQuery] How to display an ajax loading icon when page loading?
This is the first time I research about this product,in your page i see the ajax icon loading before the page display,so how can i use it with jquery?
[jQuery] Basic AJAX Q: how to replace current with XHR-fetched page?
<div dir="ltr">This is the most basic AJAX question. Suppose my script fetches a new page using $.( '<a href="http://some/url">http://some/url</a>', ... ). I'd now like to replace the currently displayed page with the newly fetched one. I suppose that I need to make a new DOM subtree from the downloaded content and replace the subtree corresponding to the current page with this newly generated subtree... But I'm not sure of how one does this.<div> <br class="webkit-block-placeholder"></div><div>Could
Next Page