[jQuery] [validation] Validate on dynamic loaded forms?
This does not work: $(document).ready(function() { $("#menu_move_eq").click( function() { $(".hiddenform").hide(); $("#movebox").show(); }) $("#menu_new_equipment").click( function() { $(".hiddenform").hide(); $ ("#equipmentbox").load("form_equipment.php","",LoadFormEquipment); $("#equipmentbox").show(); }) } ); function LoadFormEquipment() { $("#commentForm").validate(); /// Fails, never returns. $("#cemail").hide("slow"); $("#cemail").show("slow"); } The form_equipment.php: <form class="cmxform"
[jQuery] Jquery Validate Dependency Callback Error Message?
I need to make sure that 1 field os less than the other so I am using the dependency callback feature and it's working but I cannot get an error message to display - anyone get this to work? Here is my code: $(document).ready(function(){ $("#AddPartner").validate({ rules: { GlobalDiscount: { required: function(element) { if ($("#GlobalDiscount").val() <= 20) { alert('passed'); return true } else { alert('falied'); return false } if ($("#GlobalDiscount").val() <= $ ("#ComissionSplit").val()) { alert('passed');
[jQuery] Question about Jquery load from exernal html
Hi there, I am really new to all this. Been a while since I looked at code but... I had a project and I think I bit off more than I can chew. What we need to do (without using php because thats WAY beyond me right now) is place a divs from an external doc into the main doc. can the load here be made to work with html or any client side coding instead of PHP? What we want to do is have a div in our main document get loaded with <div class='cat 1'> or <div class='cat 2'> depending on which button is
[jQuery] jQuery multiple plugin clashes
Hey all! I'm new to using jQuery and pretty new to javascript, basically I am trying to use multiple jQuery plugins on a single page however the outcome varies from safari and firefox (only tested on them so far) depending on the order in which I load them. For example, one order everything will work fine in safari but one plugin will fail in firefox. Is there a certain procedure for loading multiple plugins without these problems? Thanks in advance! Steve Code Example: <script type="text/javascript"
[jQuery] HOW TO: Use PHP 5 Classes with JQuery and JSON to Insert into a MySQL DB
I wrote this article since there is not a place that explains this in one simple way. Hope you all find it useful. Please comment if you think of ways I can optimize. This article will explain in the most basic terms how you can use the JQuery API to insert form values to a MySQL database using no form actions, just JQuery. Pretty cool stuff. I wanted to create a CSS/Ajax powered database management system and the code you see here is the very streamlined version of this effort. <a href="http://fluxux.com/?p=132">http://fluxux.com/?p=132</a>
[jQuery] help me
i need develop drag and drop web componet..for that i need to assign unique id each time i drag a element(eg:div); how can i do it............................
[jQuery] Select all for multiple sections
Hello all, I need a "select all" to work, and be limited to, multiple sections on page. How many of these sections there will be on a page is not known. Each section needs its own "select all" trigger. For example: (but how many of these groups there would be would be unknown) <div> <a href="">Select All</a> <a href="">Deselect All</a> <label><input type="checkbox" />Item 1</label><br/> <label><input type="checkbox" />Item 2</label><br/> <label><input type="checkbox" />Item 3</label><br/>
[jQuery] Unbind not unbinding
<form name="newSpecificLeadSourceForm" action="#" method="post"> <input type="text" name="source" size="30" /></td> <input type="text" name="code" /> <a href="#" id="suggestCode">suggest code</a> <input type="submit" value="Save it!" /> </form> ... var existingCodes = new Array('<?php echo implode("','", $existingCodes); ?>'); var form = document.newSpecificLeadSourceForm; $('#suggestCode').click(function() { $(this).css('display', 'none'); $(form.source).bind('keyup', function()
[jQuery] New jquery website not quite there yet
Noticed your news about the new jquery website. Please check it in IE7, as some of the CSS is not being applied. The white content background doesn't get applied in most pages, nor does the left navigation background. So, it's extremely hard to read and navigate. Example: http://groups.google.com/group/jquery-en/post?_done=%2Fgroup%2Fjquery-en%2Fpost - even the home page falls apart. Would send screen shots, but can't attach files here.
[jQuery] JQuery scrollto not working in IE6
jquery.scrollto does not work in IE6 if my html file defined as: <?xml version="1.0" encoding="ISO-8859-1" ?> <!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> .... however, if i remove the first line (<?xml version="1.0" encoding="ISO-8859-1" ?>), it works but our website does not allow me to remove this xml definition, I am just wondering why this line matters. I also tested
[jQuery] Drag/Drop works, but not after loading via a menu into my content div?
Hi all, i am a beginner with javascript and finally found out how to drag the content (a playingcard) from one div to another one. it works when i load the page and include the content inside a content div, but..... Normally i have a indexpage with a content div. I use a menu, which loads stuff in my content div like: $('#nav li a').click(function(){ if($(this).attr('href') === 'http://www.helenaweb.nl/ Klaverjassen/') { return true; } else { var ModToLoad
[jQuery] IE browser logo and jquery?
Hello, I have an asp.net app (2.0, using vs2005), running jquery1.2.x and IE 6.0.2 on a XP box. I am seeing a peculiar behavior pertaining to some of the hyper-links: When i click on the 'submit' button, the IE logo at the top-right-side of the browser starts to rotate (indicating that it's trying to get the result/target-page), but if i take my cursor over couple of hyper- links on this parent-page (result-page hasnt loaded, so still seeing the original form), the logo stops rotating and the page-load-status
[jQuery] Best practices: Wait to reference objects? Classes like PHP? How do you stay organized with little overhead?
Hello, I just have a quick question about jQuery best practices... I have been wondering for a while now, is it bad practice for me to make references to objects outside of the block of code they are used in? For example, in my master JS file I might have this code: =================== // Start closure: $(function() { var $parentObj = $('#parentContianer'); var $childObj1 = $('#childEle1'); var $childObj2 = $('#childEle2'); var $childObj3 = $('#childEle3'); var $childObj4 = $('#childEle4');
[jQuery] An Interesting Twist on a Pastebin
guys, we should definitely use this online tool to ask questions. it seems really useful to our mailinglist ! <div style="margin: 0px 2px; padding-top: 1px; background-color: #c3d9ff; font-size: 1px !important; line-height: 0px !important;"> </div> <div style="margin: 0px 1px; padding-top: 1px; background-color: #c3d9ff; font-size: 1px !important; line-height: 0px !important;"> </div> <div style="padding: 4px; background-color: #c3d9ff;"><h3 style="margin:0px 3px;font-family:sans-serif">Sent to you
[jQuery] I need a media tutorial
Can someone please advise? All of a sudden, I need to embed tons of media. I carefully read Mike Alsup's Media Plugin (http://malsup.com/ jquery/media/) and several others, including JWPlayer (http:// jeroenwijering.com/) and jMedia (http://www.contentwithstructure.com/ extras/jmedia) - but I still don't understand what I'm supposed to be doing with them. For now, I've made do with a combination of iframes and home-made Flash. I looked at a bunch of simpler plugins, but they all seemed to be jQuery-fied
[jQuery] UI datepicker: two inline datepickers with range selection
I hope somebody could help me on this. How can I create the two inline datepickers and have range selection between those? So basically combining the ideas behind the "another date range" and "inline date picker". Thanks for your help!
too mant jQuery code lines + jQuery and google?
hello everyone, i have two question: 1. i have more than 100 hundred code lines of jQuery in my file, and i don't think that it is too secure that any user can see those codes in just one link... does anyone has any sulotions on how i can hide my code? 2. does google index pages that has jQuery inside? or, content that beeing show and hide (toggles) by jquery? thank u!
[jQuery] ANNOUNCE: ui.timepickr.js plugin
For the past two days I've been working on a experimental plugin which aims to enhance user experience when it comes to input time in a form. I've made a first "unofficial" announcement on my blog: http://haineault.com/blog/71/ Considering the constant flow of positive feedbacks I got since I posted it (which successfully crashed my hosting server), I'm proud to announce that I'll make my best to create an official jQuery plugin with it. There is still a *lot* of work, polish, documentation and test
[jQuery] Case-insensitive version of :contains(text) ?
The selector :contains(text) appears to be case sensitive (though there's no mention of this in the jQuery docs). Is there a case insensitive version?
[jQuery] Ajax request Error - please help
Hi, In localhost, all of my ajax request work perfectly, but on the prod server, whenever I try to make an ajax request, the following error appear: (This is the code used to display the error: error: function(xhr, status, ex) { var msg = "Error ajax edit profile :\n\n"; msg += "RESPONSE TEXT :\n"; msg += xhr.responseText + "\n\n"; msg += "STATUS :\n"; msg += status + "\n"; msg += xhr.status + "\n\n"; msg += "EXCEPTION :\n"; msg += ex; alert(msg); }, ) Error ajax
[jQuery] I can't understand how work with <li> elemetnts
At first sorry for my English I have stupid problem: There is document like that: <ul class="class1"> <li class="selected">Item 1</li> <li>Item 2</li> <li>Item 3</li> </ul> ..... <ul class="class1"> <li class="selected">Item 1</li> <li>Item 2</li> <li>Item 3</li> </ul> ..... <ul class="class1"> <li class="selected">Item 1</li> <li>Item 2</li> <li>Item 3</li> </ul> ------------------------- and css like that: ul.class1 li { dispaly: none; } .selected { display: list-item; } And I have function: setType
[jQuery] Unbind not unbinding
I've got the following: var existingCodes = new Array('<?php echo implode("','", $existingCodes); ?>'); var form = document.newSpecificLeadSourceForm; $('#suggestCode').click(function() { $(this).css('display', 'none'); $(form.source).bind('keyup', function() { var code = $(this).attr('value').replace(/[^A-Z0-9\-]/ig, ''); if (existingCodes.indexOf(code) == -1) $(form.code).attr('value', code); }).keyup(); }).click();
[jQuery] am i joined or not?
<div dir="ltr">why, after receiving the "You are now a member of jQuery (English)." message, do i still receive the "To post a message you must first <a href="http://groups.google.com/group/jquery-en/subscribe" target="_top">join this group</a>." message when trying to post a comment?? thanks, Atg -- Aaron T. Grogg Web Design & Development Web: <a href="http://aarontgrogg.com">aarontgrogg.com</a> AIM: aarontgrogg Cell: 301-332-7660 </div>
[jQuery] [validate] Showing/hiding fields depending on conditions
Hello! I am currently trying to use the validation plugin for jQuery to improve my current code generator for making forms. I would like to support conditional fields, meaning that it shows or hides other fields depending on the evaluation of a conidition. For example, if fieldA is B then it should show fieldQ, fieldR. If not it should hide. Are there any way to do this easily with jQuery and it's validation plugin? Thanks! Weyert de Boer
[jQuery] Looking after dropdown menu like's Superfish with RTL support
<div dir="ltr">Hi, I'm coding an RTL'ed Hebrew website for a client, The menu in this website is designed to be a vertical dropdown menu. Just like in this plugin: <a href="http://users.tpg.com.au/j_birch/plugins/superfish/#examples">http://users.tpg.com.au/j_birch/plugins/superfish/#examples</a> (the vertical example) The problem is that I couldn't turn Superfish into RTL view (so the submenus will be open in the left side of the main menu instead of the left of it). Does anyone have experience
[jQuery] wanna implement some of facebook feature
hi, just would like to know if any jquery UI that can implement a facebook feature. as a facebook user, there is a text input area shown "what are you doing right now?" near top of the page for every logined user. so when mouse click inside that text, it will let you input text with a "Post" button as well and once if mouse click other area, it will change back to previous status. i would like to know any jquery UI can implement this kind of feature? it is very useful for user to input when they
[jQuery] Getting value of form field
I am trying to get the value of a form field so I can construct a condition for use with eval(). Only I am having trouble to get the value of the given form field. The current form field I am trying to get the value from is: <select name="question_2" id="question_2" tabindex="2" class="full field select question blurb bliep blah"> <option value="b">a</option> <option value="c">b</option> <option value="d" selected="selected">c</option> <option value="e">d</option> <option value="f">e</option> </select>
[jQuery] Handling $.get answer
Hi all: I´m new to JQuery, so maybe i´m doing something badly. I have a previously defined javascript tree, i´m rewriting the code to use ajax. This tree has a function beforedelete: function(node) If this function returns false, no node will be deleted in user interface. If sends true, the node is deleted. I need to use $.get to decide if the tree node is deletable or not, so i write this code: beforedelete: function(NODE) // before delete - should return true | false { isOK = false; $.get("/isdeletable",
[jQuery] Nubee - concatenating & code help
First of all, is it possible to concatenate events with similar (the same) functions? For example: $(".closerbutton").show("slow"); $(".editbutton").show("slow"); ...would be like $(".editbutton", ".closerbutton")... I know that's not possible, but is there another way? I also need help with a script. $(function() { $(".portfolio").click(function() { $(".jq").load("/portfolio/", function() { $(this).slideDown("slow"); }); $(".closerbutton").show("slow").attr("title",
[jQuery] Replacing colors
Hi, I am wondering if it is possible to replace specific font color of all style classes in one step? For example, I have a few classes: <style> .header { color: #F00; } .body { color: #000; } .footer { color: #F00; } </style> Now I would like to replace 'color' value in all classes where it's values is '#F00'. In real situation, there are 30 classes or more - not just 3. If it is possible to replace colors using selectors it would be great but I did't find any that would filter out elements according
[jQuery] Clone form fieldset, issues replacing id
If you have in mind the part in facebook where you can add new education experiences or new jobs you will understand better what I am trying to do. The user can click on "add new job" and new fieldsets are added to the form. Each fieldset contains various fields In the code there is always an empty fieldset with id #workfieldset_0 $("#workfieldset_0").hide(); // hide the empty fieldset $("#addnewjob").click(function() { //if user clicks the link to add var fromClone = $("#workfieldset_0").clone();
Any ideas how I may go about replicating the effect?...
Hi, I'm implementing the tabs plugin to create a smooth transition between pages, however, I've come across a very nice version on Apples site which also includes an animated scollbar. Does anyone know how I my go about creating the same effect? The tabs integration at the moment seems to work ok but in FF3 it's not very smooth. Many thanks A
[jQuery] Ajax Code Optimization (delay)
Hello, i want to optimize my code. Example: $(document).ready(function() { $('.message_subject').click(function() { var msgBox = $(this).parent().parent().parent(); var msgID = msgBox.attr('id'); msgBox.find('.message_text').slideToggle('normal'); msgBox.find('.message_options').find('.message_deletestatus').html('ungelesen'); $.post('/pms/ajaxControl', { msgID: msgID, job: 'setStatus' }); msgBox.find('.message_status').after().html('<img src="/img/icons/
[jQuery] Code execution order
I am having trouble understanding something about execution order of code using JQuery. I have the following function attached to a button: function UpdateList() { // Open the xml file $.get("locations.xml",{},function(xml){ // Run the function for each name tag in the XML file $('location',xml).each(function(i) { alert($(this).find("name").text()); }); }); alert("Test"); } What I expect to happen is that the alert will be displayed for each of
[jQuery] Validate: minor problem with selects
I'm having a bit of a problem with Validate 1.4 and selects. The problem is a minor one but it is rather irritating so a solution would be nice. :) The problem is that if changing a select changes its validity then the validator doesn't respond to this until the select loses focus. I'd imagine others have run into this as well and I'm sure there's a solution floating around, so if you'd care to share it I'd appreciate it.
[jQuery] a more general rule?
i have a form and a bunch of inputs. How do i make it so that all my input apply the same validation rule without having to put in the name attr. in the rules? so I have class="numOnly" in my <input> this won't work, $(document).ready(function(){ $(".numOnly").validate({ rules: { required: true, range:[0,100] } }); } this only works if i put in the name attr like: $(document).ready(function(){ $(".numOnly").validate({ rules: { blah: { required: true, range:[0,100] } } }); } since my input field only
[jQuery] Tabs - select tab when creating a new remote tab
I'm using the UI Tabs (very nice). I need to create a new remote tab and then select it, however the only way I can see reading the documents is to select it by index, which will not work for me as one or more new tabs can be created, so it not possible to know in advance the index. Is it possible to add a fragment-identifier to a tab created remotely, or get the index of the newly created tab? thanks
[jQuery] superfish onclick patch--help with setup
can anyone provide clearer directions--a bit more step by step for us quizzical new ones--as to how to get the onclick patch running and working for superfish plugin? thanks. c.s -- View this message in context: http://www.nabble.com/superfish-onclick-patch--help-with-setup-tp19893657s27240p19893657.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
Ajax onclick optimization
Hello, i want to optimize my code. Example: $(document).ready(function() { $('.message_subject').click(function() { var msgBox = $(this).parent().parent().parent(); var msgID = msgBox.attr('id'); msgBox.find('.message_text').slideToggle('normal'); msgBox.find('.message_options').find('.message_deletestatus').html('ungelesen'); $.post('/pms/ajaxControl', { msgID: msgID, job: 'setStatus' }); msgBox.find('.message_status').after().html('<img src="/img/icons/ email_open.png" />'); msgBox.children('.message_user').children('p').children('.message_subject').css('font-
[jQuery] Ajax onclick optimization
Hello, i want to optimize my code. Example: $(document).ready(function() { $('.message_subject').click(function() { var msgBox = $(this).parent().parent().parent(); var msgID = msgBox.attr('id'); msgBox.find('.message_text').slideToggle('normal'); msgBox.find('.message_options').find('.message_deletestatus').html('ungelesen'); $.post('/pms/ajaxControl', { msgID: msgID, job: 'setStatus' }); msgBox.find('.message_status').after().html('<img src="/img/icons/
Next Page