[jQuery] Re: Only show 5 list item, hide the rest?
Thanks, you're a genius. But it didn't work in IE6, where I need it. Any solution? On Feb 12, 12:32 am, tres treshug...@gmail.com wrote: Oh and also Safari 3.1.2 Windows. -Trey
[jQuery] Join me on Bebo
I think you will like it. Click to find out why http://www.bebo.com/in/8643502756a306595716b135 .. This email was sent to you at the direct request of Yasantha Thushara thusharaweerasin...@gmail.com. You have not been added to a mailing list. If you would prefer not to receive invitations from ANY Bebo members please click here - http://www.bebo.com/unsub/8643502756a306595716 Bebo, Inc., 795 Folsom St, 6th Floor, San Francisco, CA 94107, USA.
[jQuery] Re: How to find the biggest value?
Hi David, var max = null; $(#box div).each(function() { if ( !max || max.height() $(this).height() ) max = $(this); }); // flash max div max.fadeOut().fadeIn(); by(e) Stephan 2009/2/12 David .Wu chan1...@gmail.com: for example, how to find biggest div height under box. div id=box div./div div./div div./div /div
[jQuery] Working with identical objects
Hi, I have a form with dynamically added fields in it. The plugin that works with those fields have several private fields and functions. What is the right way of grabbing the data from from the right object. For example: I'm using drop downs as generated dynamically fields. If I there is only one drop down of this kind (with specific ID) everything is working fine and I can easily retrieve what is selected. But once I'm one or more added, the selected value grabbed from the last added. What is the right way of doing it? Thanks.
[jQuery] Re: possible jQuery ui icon bug
I've forwarded your question over to the jQuery UI Dev list: http://groups.google.com/group/jquery-ui-dev/browse_thread/thread/4c52d350224505cd We're not able to reproduce it over there. Perhaps you could add some more detail (maybe a code sample) to that thread. Thanks. - Richard On Wed, Feb 11, 2009 at 9:49 AM, jim smalltown...@yahoo.com wrote: Run the jQuery UI Sortable - Portlets Demo and try swapping ui- icon-minusthick for ui-icon-plusthick, and you will notice that it only seems to see the ui-icon-minusthick part of the image. This appears to be the case for any pairing of icons where the second icon appears to the right of the first icon in the ui-icons_*.png file.
[jQuery] Re: Working with identical objects
Here is my code: /** * Page template part setup div */ (function(jQ){ /** * form state */ var STATE = new; /** * Request URL */ var RequestUrl = rootUrl+/aranAjx.php?mod=pages; /** * indicator if there is one form is open */ var formOpen = false; /** * Actions */ var MODULE_LIST = act=modules; /** * Load image object */ var loadImgObj = jQ(img/img).attr(id, stdLoadImg).attr (src, jQ.STD_LOAD_IMG); /** * Object of template part form */ var PartObj = null; /** * HTML select object of availble options */ var ModulesListObj = null; /** * Events */ var OnBeforeSend = function(){ jQ(this).append(loadImgObj); }; var OnSuccess = function(data){ //parse the data if(data['status'] == OK){ ShowFormMessage(data['body']['message']); //change tha action to edit jQ(#action).val(edit); jQ(#tplName).attr(readonly, readonly); } else if(data['status'] == FAIL){ ShowFormError(data['reason']); } }; var OnSuccessGetMosules = function(data){ //parse the data if(data['status'] == OK){ var modules = data['body']['modules']; ModulesListObj = jQ(select/select).change(OnModuleSelect); jQ.each(modules, function(i, module){ jQ(option/option).attr(value, module.modeCode).text (module.name).appendTo(ModulesListObj); }); ModulesListObj.insertBefore(loadImgObj); } else if(data['status'] == FAIL){ ShowFormError(data['reason']); } }; var OnError = function(txt){ ShowFormError(Fatal error during request: +txt); }; var OnComplete = function(){ jQ(loadImgObj, this).remove(); }; /** * init part */ jQ.fn.PartInit = function(){ if(formOpen){ return; } if(!jQ(this).is(div)){ $.log(Template part form must be 'DIV' element!); } PartObj = this; if(STATE == edit){ } else if (STATE == new){ //send the reauest for module list first. var options = { url: RequestUrl, data: MODULE_LIST }; //bind events this.onBeforeSend = OnBeforeSend; this.onError = OnError; this.onComplete = OnComplete; this.onSuccess = OnSuccessGetMosules; //send ajax request jQ(this).ijajax(options, this); return jQ(this); } } /** * Module selection event handler */ var OnModuleSelect = function(){ alert(jQ(option:selected, ModulesListObj).val()); }; /** * Show form error */ var ShowFormError = function(err){ jQ(div/div).addClass(araneumErrDiv).text(err).prependTo (#tplPartsContainer); }; /** * Show form message */ var ShowFormMessage = function(mess){ jQ(div/div).addClass(araneumMessDiv).text(mess).prependTo (#tplPartsContainer); }; /** * remove error and message divs */ var RemoveErrorMessage = function(){ jQ(.araneumMessDiv,.araneumErrDiv).remove(); }; })(jQuery)
[jQuery] Re: how to fade in image after the site loads?
Hi, Try something like this: $('#photo img').load(function() { $('.pic').fadeIn(); $('div.position').fadeOut(); $('.site').fadeIn(); }); The .load() event should fire when the images has loaded. You don't need to remove the classes pic and site to get the fades in/out to work. Paul On Feb 11, 11:17 pm, surreal5335 surrea...@hotmail.com wrote: I am working making an intro page to a photo site and I need the image to fade in slowly after the site finishes loading. I believe I have the jquery correct but something is obviously wrong. Right the now the image is hidden, but it wont fadeIn. I am also trying to get the text Please wait for site to load to slowly fadeOut during this, then after all thats done, fadeIn the Enter Site text. Here is the code I am using for it. So far only a few things are working properly. script type=text/javascript src=http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/ jquery.min.js/script script type=text/javascript $(document).ready(function(){ $(span).ready(function(){ $(this).removeClass(pic){ $(this).fadeIn(4000); } }, function() { $(div).fadeOut(6000); }, function() { $(a#site).removeClass(site); $(this).fadeIn(1000); }); }); /script style type=text/css a.site {display: none} span.pic {display: none} table.position {position: center} div.position {text-align: center} /style /head body table border=1 class=position tr td span id=photo class=pic img src=/test/land_scape_5.png /span /td /tr tr td div class=positionPlease wait for site to load/div a href=# class=site id=site style=text-align: rightEnter Site/a /td /tr /table Here is the link to the page to see whats it giving me: http://royalvillicus.com/test/photo.html I appreciate all the help
[jQuery] Re: Encoding characters using load(some_file.html)
http://www.w3schools.com/XML/xml_encoding.asp On 2 fev, 07:34, Hilmar Kolbe hko...@googlemail.com wrote: I have the same problem with german characters (Umlaute) - each umlaut comes in with a charCode of 65533. Is there really no way to get an 8859-page via Ajax with unencoded characters?
[jQuery] Re: Dynamic form - adding new input element doesnt work in IE
Hi Alex, I haven't tested this so might be a red herring. When you add the clonedRow you append it to the table. When you scan for last row you look for last tr in the form. It could be that IE adds the new row after the /form tag. Try changing the append command to: $(#dmsProductTable form).append(clonedRow); or (if you can) restructure the HTML so that the form tags are outside the table. Paul On Feb 11, 11:15 pm, WiB alexwib...@gmail.com wrote: Hi, I have a form which is embedded inside table, and I'd like to add new form input to it. Here is my code: function addRow(size){ // need to capture the row class, to add to the new row var firstRow=$(#dmsProductTable tbody:first-child tr:first- child); var firstRowClassNames=firstRow.attr('class'); var columnsInFirstRow=firstRow.find(td); var numColumns=columnsInFirstRow.length; for (var i=0; isize;i++){ // need to capture the new row index prior to adding new row var newRowIndex = $(#dmsProductTable tbody:first-child form tr).length; var clonedRow= $(#dmsProductTable tbody:first-child form tr:last-child).clone(); var tds=clonedRow.find(td); clonedRow.find(td).each(function(){ $(this).find(input).each(function(){ var currentName=$(this).attr(name); alert(current name + currentName); // take note of this var newName=currentName.replace([+(newRowIndex-1)+], [ + newRowIndex + ]); $(this).attr(name,newName); }); }); $(#dmsProductTable).append(clonedRow); } } The HTML looks like: table id=dmsProductTable tbody form id=shitform tr class=blah td class=shit input name=order[0] class=number type=text size=1/ input /td /tr tr class=blah td class=shit input name=order[1] class=number type=text size=1/ input /td /tr /form /tbody /table This works fine in Firefox. It adds new row, and the index of the 'order' input is correctly set. However, in IE 7, only the first addition to the form is correct. I.e. I will have order[2]... but after that... any new addition will be order[2] , order[2], and so on. In my code above the alert(current name + currentName); will always echo 'order[1]', even though new row has been added (which will have 'order[2]', 'order[3]' and so on). So it seems to me that the traversal doesnt really look at the latest DOM - it remembers the first time the DOM is read. Any help is much appreciated! Thanks! Alex.
[jQuery] Upgraded from 1.2.1 to 1.3.1 and jquery.flash has stopped working.
Hello! I have just upgraded from jQuery 1.2.1 to 1.3.1 however this has broken the jQuery.flash plugin. (I'm also using jquploader in the page but I think it's jquery.flash that's causing the problem. I'm getting this error in fireBug [Exception... 'Syntax error, unrecognized expression: [...@type='file']' when calling method: [nsIDOMEventListener::handleEvent] nsresult: 0x8057001e (NS_ERROR_XPC_JS_THREW_STRING) location: unknown data: no] Has anyone else had this issue or know how I can resolve this? Thanks
[jQuery] Re: Is there a problem with Child selectors in Safari with 1.3?
On 22.01.2009, at 21:23, andrew wrote: Hi I've got an application that has a pop up div which has controls that submit an ajax post before which I'm getting some hidden variables from within the popup div, I'm using 'live' with the popup div controls. I'm referencing the elements by their parent id then their specific Id, eg $(#container #elmId).val(). This works fine in firefox but not in Safari, I get an undefined if I alert the variables. It also works fine in both browsers using jquery 1.2.6 but not with 1.3. Has anyone else has similar problems? $(#id .class) works for me in Safari 3.2.1 with jQuery 1.3.1 (did not test 1.3.0) in my project, but other stuff which worked in 1.2.6 simply selects the wrong elements $(#id).find(.class) fails $(.class, DOMElement) fails The exact same code works in Firefox, though. -- Markus Peter - w...@spin.de - http://www.spin-ag.de/ - http://www.spin.de/ SPiN AG, Bischof-von-Henle-Str. 2b, 93051 Regensburg, HRB 6295 Regensburg Aufsichtsratsvors.: Dr. Christian Kirnberger, Vorstände: F. Rott, P. Schmid
[jQuery] jquery doesn't work, when loaded with ajax
Hello. I'm building a wab page with ajax. Well, everything was fine, before i needed to create a form for file uploading. Basicaly it works this way: User loads webpage (www.exmpl.com) click upload - a form is placed into div, using ajax. That form contains jquery code for form handling/file uploading and it doesn't work. When i load form directly, with an url - it works. When form is placed into div with AJAX-nothing works Is there a way to do what i want? here's the source.. table width=600 border=0 height=100% cellpadding=0 cellspacing=0 tr td height=6 style=background-image:url(images/k_v.jpg);height: 6px;/td td height=6 style=background-image:url(images/v.jpg);height: 6px;/td td width=6 height=6 style=background-image:url(images/ d_v.jpg);height:6px;/td /tr tr td width=5 style=background-image:url(images/k.jpg)nbsp;/ td td bgcolor=#edf2f8 valign=top height=100%Array ( ) div id=adding_ad link rel=stylesheet type=text/css media=screen href=http:// malsup.com/jquery/form/form.css / script type=text/javascript src=http://malsup.com/jquery/ jquery-1.2.3.js/script script type=text/javascript src=http://malsup.com/jquery/block/ jquery.blockUI.js/script script type=text/javascript src=http://malsup.com/jquery/firebug/ firebug.js/script script type=text/javascript src=http://malsup.com/jquery/form/ jquery.form.js/script script type=text/javascript $(function() { $('form').ajaxForm({ beforeSubmit: clearOutput, success: writeOutput }); // normal activity indicator (ala gmail) $('div id=busyLoading.../div') .ajaxStart(function() {$(this).show();}) .ajaxStop(function() {$(this).hide();}) .appendTo('#main'); }); $().ajaxError(function(ev, opts, xhr, msg, ex) { //window.console.error(msg + ': ' + ex); alert(msg + ': ' + ex); }); // blockUI activity indicator $.extend($.blockUI.defaults.overlayCSS, { backgroundColor: '#00f' }); $.blockUI.defaults.pageMessage = 'h1img src=../../block/busy.gif / Submitting.../h1'; $().ajaxStart($.blockUI).ajaxStop($.unblockUI); // pre-submit callback function clearOutput(a, f, o) { o.dataType = $('select')[0].value; $('#output').html('Submitting form...'); } // success callback function writeOutput(data) { var $out = $('#output'); $out.html('Form success handler received: strong' + typeof data + '/strong'); if (typeof data == 'object' data.nodeType) data = elementToString(data.documentElement, true); else if (typeof data == 'object') data = objToString(data); $out.append('divpre'+ data +'/pre/div'); } // helper function objToString(o) { var s = '{\n'; for (var p in o) s += '' + p + ': ' + o[p] + '\n'; return s + '}'; } // helper function elementToString(n, useRefs) { var attr = , nest = , a = n.attributes; for (var i=0; a i a.length; i++) attr += ' ' + a[i].nodeName + '=' + a[i].nodeValue + ''; if (n.hasChildNodes == false) return + n.nodeName + \/; for (var i=0; i n.childNodes.length; i++) { var c = n.childNodes.item(i); if (c.nodeType == 1) nest += elementToString(c); else if (c.nodeType == 2) attr += + c.nodeName + =\ + c.nodeValue + \ ; else if (c.nodeType == 3) nest += c.nodeValue; } var s = + n.nodeName + attr + + nest + \/ + n.nodeName + ; return useRefs ? s.replace(//g,'lt;').replace(//g,'gt;') : s; }; /script form id=testj1 action=tester.php method=POST enctype=multipart/form-data labelOutput:/label div id=output/div table width=98% border=0 tr td valign=top width=33%Add validity: select name=add_validity class=required option value=1 One week/option option value=2 Two weeks/option option value=3 Three weeks/option option value=4 Month/option /select/td td valign=top width=33%label/label/td td valign=top width=33%nbsp;/td /tr tr td valign=toplabel input type=checkbox name=broken value=1 /Broken /label/td td valign=topnbsp;/td td valign=topnbsp;/td /tr tr /table table width=98% border=0 tr td valign=top width=33%Add photo: /td td valign=top width=33%nbsp;/td td valign=top width=33%nbsp;/td /tr tr td colspan=3 valign=toplabel input name=file1 type=file size=50 / First photo will be primary /label/td /tr tr td colspan=3 valign=topinput name=file2 type=file size=50 //td /tr tr td colspan=3 valign=topinput name=file3 type=file size=50 //td /tr tr td colspan=3 valign=topinput name=file4 type=file size=50 //td /tr tr td colspan=3 valign=topinput name=file5 type=file size=50 //td /tr tr td colspan=3 valign=topinput name=file6 type=file size=50 //td /tr tr td valign=topnbsp;/td td valign=topnbsp;/td td valign=topnbsp;/td
[jQuery] ClueTip Tooltips only appear on PageLoad, but not after partial page postback in ASP.Net web application
Apologies if this post appears twice, but I posted it at approx 9am GMT, but it never appeared. When using ClueTip within and Ajax UpdatePanel, the tooltip appears on initial page load. Then clicking on an 'edit button' hides one panel and displays another. Upon returning to the initial page view (clicking 'Cancel' or 'Save' performs a second partial page update and returns to the initial grid view), the tooltip no longer displays. Is this a limitation of the clueTip plugin, or do I need to do something particular to resolve this issue? The script is initialised as: script type=text/javascript language=javascript $(document).ready(function() { $('.nicetooltip').cluetip ({ attribute: 'rel', splitTitle: '|', cluetipClass: 'jtip', dropShadowSteps: 2, ajaxCache: true }); }); /script
[jQuery] loading jquery functions for a form, loaded with ajax
Hi. In my application, i need to load a page with ajax. Loaded page contains jquery functions, to handle form submitting. The problem is that when i load that form with ajax, none of the functions works and when i push submit it opens target url, not reloads itself with ajax.. when i open the page directly, by typing it's address, everything works fine, form submits etc. How can i force jQuery to work, when loaded by ajax? here's the source: table width=600 border=0 height=100% cellpadding=0 cellspacing=0 tr td height=6 style=background-image:url(images/k_v.jpg);height: 6px;/td td height=6 style=background-image:url(images/v.jpg);height: 6px;/td td width=6 height=6 style=background-image:url(images/ d_v.jpg);height:6px;/td /tr tr td width=5 style=background-image:url(images/k.jpg)nbsp;/ td td bgcolor=#edf2f8 valign=top height=100%Array ( ) div id=adding_ad link rel=stylesheet type=text/css media=screen href=http:// malsup.com/jquery/form/form.css / script type=text/javascript src=http://malsup.com/jquery/ jquery-1.2.3.js/script script type=text/javascript src=http://malsup.com/jquery/block/ jquery.blockUI.js/script script type=text/javascript src=http://malsup.com/jquery/firebug/ firebug.js/script script type=text/javascript src=http://malsup.com/jquery/form/ jquery.form.js/script script type=text/javascript $(function() { $('form').ajaxForm({ beforeSubmit: clearOutput, success: writeOutput }); // normal activity indicator (ala gmail) $('div id=busyLoading.../div') .ajaxStart(function() {$(this).show();}) .ajaxStop(function() {$(this).hide();}) .appendTo('#main'); }); $().ajaxError(function(ev, opts, xhr, msg, ex) { //window.console.error(msg + ': ' + ex); alert(msg + ': ' + ex); }); // blockUI activity indicator $.extend($.blockUI.defaults.overlayCSS, { backgroundColor: '#00f' }); $.blockUI.defaults.pageMessage = 'h1img src=../../block/busy.gif / Submitting.../h1'; $().ajaxStart($.blockUI).ajaxStop($.unblockUI); // pre-submit callback function clearOutput(a, f, o) { o.dataType = $('select')[0].value; $('#output').html('Submitting form...'); } // success callback function writeOutput(data) { var $out = $('#output'); $out.html('Form success handler received: strong' + typeof data + '/strong'); if (typeof data == 'object' data.nodeType) data = elementToString(data.documentElement, true); else if (typeof data == 'object') data = objToString(data); $out.append('divpre'+ data +'/pre/div'); } // helper function objToString(o) { var s = '{\n'; for (var p in o) s += '' + p + ': ' + o[p] + '\n'; return s + '}'; } // helper function elementToString(n, useRefs) { var attr = , nest = , a = n.attributes; for (var i=0; a i a.length; i++) attr += ' ' + a[i].nodeName + '=' + a[i].nodeValue + ''; if (n.hasChildNodes == false) return + n.nodeName + \/; for (var i=0; i n.childNodes.length; i++) { var c = n.childNodes.item(i); if (c.nodeType == 1) nest += elementToString(c); else if (c.nodeType == 2) attr += + c.nodeName + =\ + c.nodeValue + \ ; else if (c.nodeType == 3) nest += c.nodeValue; } var s = + n.nodeName + attr + + nest + \/ + n.nodeName + ; return useRefs ? s.replace(//g,'lt;').replace(//g,'gt;') : s; }; /script form id=testj1 action=tester.php method=POST enctype=multipart/form-data looots of values looots of values looots of values looots of values looots of values looots of values input type=submit name=Submit value=Add / /form /div /td td style=background-image:url(images/d.jpg)nbsp;/td /tr tr td width=5 height=9 style=background-image:url(images/ k_a.jpg)/td td height=9 style=background-image:url(images/a.jpg)/td td height=9 style=background-image:url(images/d_a.jpg)/td /tr /table Thanks for replies:)
[jQuery] jQuery conflict with mootools
Hi. I'm currently developing a website and want to use jCarousel from sorgala.com (http://sorgalla.com/jcarousel/). It use jQuery ver. 1.2.3. But on same page, I use accordion menu that use mootools ver. 1.2. At first, there is a conflict and the accordion menu didn't work. After some searching and reading, I add 'script type=text/ javascriptjQuery.noConflict();/script' after the definition of the jCarousel (the script definition of accordion menu is above jCarousel). I'm glad that the problem solved. But now I just figured that I still have problem when displaying my site in IE 6.0 (previously I use Firefox). At first the carousel is working, i can click next several time but then it stop. Can't click next or previous. It seems like the carousel is freezing. Is the jQuery still conflict with mootools ? How to solve this ? Thank you. Regards, Miko
[jQuery] Looking for a JQuery Validation Control
I'm looking for a JQuery Validation control that will allow us to show a small image if a form field is valid. So for instance a user is filling out a form..tabs to the next form field. The previous form field will show to the right of the field a little icon signifying that it's a valid entry. I've looked at all the controls in the JQuery Plugin page and don't see one that will allow me to do this. Anyone here know of one or a way using a plugin to modify it and show a pic like this during validation?
[jQuery] Sortables and .live
Hello, group! I'm using jQuery 1.3.1, UI Core 1.6rc6, and UI Sortable 1.6rc6 on a page. I couldn't find any documentation on how to use the new .live event with the sortables. It's got to be possible, right? Here's my sortable code: $(#the_list).sortable({ handle : '.handle', axis: 'y', update : function () { var order = $('#the_list').sortable('serialize'); $(#info).load(process-sortable.php?+order); } }); I'd appreciate any help! Thanks!
[jQuery] Lightbox/ThickBox Accessibility
HAs anyone come accross a lightbox/thickbox plugin for jquery, that they would class as accessible? Using perhaps ARIA, i have tried using .focus() but i am having no luck with my testing to ensure it does move the user to the lightboxed content. Thanks John
[jQuery] Using clueTip in a ASP.Net website
I've managed to set up the clueTip plugin to display extended information for a datarow in a grid. The tooltip works fine on initial page load, but I use AJAX to perform partial page postbacks for editing the records in the grid. When returning from edit mode back to grid mode, the clueTip no longer takes appears, and instead the standard tooltip appears when hovering over the 'offending' element. Is this a restriction of the plugin, or should I be doing something else with the script to ensure that it always appears? I can post all my code if required, but it is split over MasterPage and ContentPage. Please advise if you need to see it all. The script portion is as follows: script type=text/javascript language=javascript $(document).ready(function() { $('.nicetooltip').cluetip({ attribute: 'rel', splitTitle: '|', cluetipClass: 'jtip', dropShadowSteps: 3, ajaxCache: true }); }); /script
[jQuery] [treeview] unique: true - possible error
Based on async demo and jquery 1.3.1: $(document).ready(function(){ $(#black).treeview({ collapsed: true, unique: true, persist: cookie, url: source.php }) }); Page loading makes one request for source.php?root=source that is OK. When I click on node to open then treeview makes requests for every node on clicked level depth. I thing it is error becouse when I set unique: false then click on node makes only one request per click.
[jQuery] Re: Content called using $().load() isn't displaying in IE (content contains an Iframe)
I'm not 100% clear on what you are asking here but, looking at your code: Looks like if you click on the anchor with class ajax you are loading the href into the #content object. Is the iframe that you are messing with on the same domain? There are a ton of funky security permissions with iframes. Especially for IE6. On Feb 11, 9:44 pm, mumbojumbo madmediabl...@gmail.com wrote: Hello, I have some code that loads content into a div using the .load function in jQuery. Now, the content that is pulled from the page is a in a div and in one of the div's, I have an I frame. The code I have works for FF Opera Safari but in IE the page doesn't do anything (Or at least, Doesn't show anything) Ideas Comments? Code: $('.ajax').bind(click, function(e) { e.preventDefault(); var fileName = $(this).attr(href); $('#content').fadeOut('slow',function(){ $(this).load(fileName+' #wrap', function(){ $('#content').fadeIn('slow'); }); }); }); the div id that is loaded is called wrap and the only page that gives me a problem in IE is the one where wrap contains an iframe.
[jQuery] Google Chrome and jQuery 1.3.1 selector issue
Hi I am having trouble with jQuery and Google Chrome (and I guess webkit) selector Basically I have a bit of code than does a wrapInner of my .bannergroup classes (wraps it's children with a div.carouselBelt) OK when I use Firefox I can do this $('.bannergroup').find('.carouselBelt').position(); With Chrome it fails (unable to get offset parent BUT this works $('.bannergroup').find('.carouselBelt')[0].position() very odd as [0] should return an element but actually returns the jQuery object You can see this on a live site at www.greenbox.com.au (which is still being made to work for various browsers IE6 and Safari/Chrome in particular)
[jQuery] Re: Finding the last sibling.
Last child method, definitely better. :-) On Feb 11, 10:13 pm, Nic Luciano adaptive...@gmail.com wrote: $(div :last-child); (or this wacky way I tried before I learned CSS selectors $(div).children()[$(div).children().size() - 1])...) Nic Lucianohttp://www.twitter.com/niclucianohttp://www.linkedin.com/in/nicluciano On Wed, Feb 11, 2009 at 9:49 PM, Risingfish risingf...@gmail.com wrote: Hi James, apologize for not being more precise. I'm using the input element as my base reference. So using that input element, I want to get the last sibling under the div. You are correct that if the span is not then the input is what I want. I may need to add more tags later (I'm sure you know hoe the development process goes when customers are involved. :) ), so a reliable way to get the last tag would be nice. Thanks! On Feb 11, 7:21 pm, James james.gp@gmail.com wrote: When you say last sibling in a parent, what does that mean? Which element is your base reference? In your example: div input .. / span.../span /div Do you mean your div is the base reference, and you want to find the last child (thus, span) relative to that? And if span is not there, you want input? On Feb 11, 4:12 pm, Risingfish risingf...@gmail.com wrote: Before I accidentally hit enter, this is what I was trying to type: :) div input .. / span.../span /div The span might or might not be there, so I would like to just get the last sibling in a parent. Thanks!
[jQuery] double popup using blockUI?
Hi I have a requirement to display a modal dialog and then show a further informational popup - does blockUI support a 'double popup' - when I call blockUI from the first popup the second displays but the first is removed, how do I override this behaviour to keep both displayed? Thanks, dan
[jQuery] $.getScript - passing the response.
I'm using $.getScript to get XML from a remote server. How do I pass the response text from that request to another function? Here's the pseudocode: $.getScript(getURL, function(){ processXML(); }); How do I pass the response text to processXML? Thanks!
[jQuery] Looking for a certain JQuery Plug-in
I'm looking for a JQuery Validation control that will allow us to show a small image if a form field is valid. So for instance a user is filling out a form..tabs to the next form field. The previous form field will show to the right of the field a little icon signifying that it's a valid entry. I've looked at all the controls in the JQuery Plugin page and don't see one that will allow me to do this. Anyone here know of one or a way using a plugin to modify it and show a pic like this during validation? -- View this message in context: http://www.nabble.com/Looking-for-a-certain-JQuery-Plug-in-tp21969385s27240p21969385.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Status Codes = docs
I would be grateful if someone could point me to documentation on status codes. Example: $post() expects a callback function whose second argument would be status. What statuses should I expect and what datatype for statuses should I expect. Links to docs would be more than adequate. http://docs.jquery.com/Ajax/jQuery.post#urldatacallbacktype
[jQuery] Re: jquery doesn't work, when loaded with ajax
I'm building a wab page with ajax. Well, everything was fine, before i needed to create a form for file uploading. Basicaly it works this way: User loads webpage (www.exmpl.com) click upload - a form is placed into div, using ajax. That form contains jquery code for form handling/file uploading and it doesn't work. When i load form directly, with an url - it works. When form is placed into div with AJAX-nothing works Is there a way to do what i want? This might help: http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_AJAX_request.3F
[jQuery] Re: Is there a way to make a textarea that auto expands as needed?
Ideas, anyone? -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Rick Faircloth Sent: Wednesday, February 11, 2009 6:56 PM To: jquery-en@googlegroups.com Subject: [jQuery] Is there a way to make a textarea that auto expands as needed? I'd like to figure out a way to make a textarea that expands with text input when necessary and shrinks, also, if possible...and without scrollbars. I've looked around, but haven't found a solution that does everything. Anyone know if that's possible with jQuery? Or how to do it? Rick
[jQuery] Re: double popup using blockUI?
I have a requirement to display a modal dialog and then show a further informational popup - does blockUI support a 'double popup' - when I call blockUI from the first popup the second displays but the first is removed, how do I override this behaviour to keep both displayed? BlockUI doesn't support concurrent full-page blocks. You could block the first popup however using the element blocking capability. Maybe something like this: $('#firstPopupContentDiv').block();
[jQuery] Re: $.getScript - passing the response.
Close but You should be using .get() for this, with an onsuccess callback (also see datatype). .getscript is solely for loading javascript files to execute. Sent from my iPhone On Feb 11, 2009, at 11:13 PM, brian.overl...@gmail.com brian.overl...@gmail.com wrote: I'm using $.getScript to get XML from a remote server. How do I pass the response text from that request to another function? Here's the pseudocode: $.getScript(getURL, function(){ processXML(); }); How do I pass the response text to processXML? Thanks!
[jQuery] Re: Removing all styles from an element-
I considered it, but because of the ambiguity I run into I just need to specify every single Css property... Thought there might be something clever I could do with jquery but pobably not... Thanks Sent from my iPhone On Feb 12, 2009, at 12:08 AM, Ricardo Tomasi ricardob...@gmail.com wrote: You could a use kind of CSS reset for your container. I usually don't like '*' declarations but this seems fit here: #myModule * { margin:0; padding:0; font-family:Arial; color:#000; height:auto; width:auto } On Feb 11, 11:09 pm, Nic adaptive...@gmail.com wrote: The scenario: I am developing a module that will live on any page it's requested to live on (any website). The issue is that if the website it's on has a broad style definition (ie. p { margin: 20px; }), this will affect my elements (in addition to the styles I define). Is there a way I can ensure that only the styles I apply are used, or to clear all styles of my elements before I apply my own? So if someone has such a definition on their page, it won't effect my module. I know I could explicitly redefine the style myself, but there is no way of telling ahead of time what styles will be defined (without defining every single css property for every single element)- so a catch all would be nice. Thanks, Nichttp://www.twitter.com/nicluciano Sent from my iPhone
[jQuery] Re: Looking for a JQuery Validation Control
This plugin: http://bassistance.de/jquery-plugins/jquery-plugin-validation/ This demo has icons: http://jquery.bassistance.de/validate/demo/milk/ Jörn On Thu, Feb 12, 2009 at 4:40 AM, expresso dschin...@gmail.com wrote: I'm looking for a JQuery Validation control that will allow us to show a small image if a form field is valid. So for instance a user is filling out a form..tabs to the next form field. The previous form field will show to the right of the field a little icon signifying that it's a valid entry. I've looked at all the controls in the JQuery Plugin page and don't see one that will allow me to do this. Anyone here know of one or a way using a plugin to modify it and show a pic like this during validation?
[jQuery] Re: Is there a way to make a textarea that auto expands as needed?
Did you skip my previous message? On Feb 12, 11:02 am, Rick Faircloth r...@whitestonemedia.com wrote: Ideas, anyone? -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Rick Faircloth Sent: Wednesday, February 11, 2009 6:56 PM To: jquery-en@googlegroups.com Subject: [jQuery] Is there a way to make a textarea that auto expands as needed? I'd like to figure out a way to make a textarea that expands with text input when necessary and shrinks, also, if possible...and without scrollbars. I've looked around, but haven't found a solution that does everything. Anyone know if that's possible with jQuery? Or how to do it? Rick
[jQuery] Re: Content called using $().load() isn't displaying in IE (content contains an Iframe)
You got my code down, that's what it does. The iframe is loading different domain, and I'm testing in IE7. I just need to figure this out by the end of the day. This is the problem though, When I load giftcards.html ( the page with the iframe) into my browser it works, but when I ajax load the iframe into another page, it doesn't work in IE7. On Feb 11, 11:28 pm, scottg...@gmail.com scottg...@gmail.com wrote: I'm not 100% clear on what you are asking here but, looking at your code: Looks like if you click on the anchor with class ajax you are loading the href into the #content object. Is the iframe that you are messing with on the same domain? There are a ton of funky security permissions with iframes. Especially for IE6. On Feb 11, 9:44 pm, mumbojumbo madmediabl...@gmail.com wrote: Hello, I have some code that loads content into a div using the .load function in jQuery. Now, the content that is pulled from the page is a in a div and in one of the div's, I have an I frame. The code I have works for FF Opera Safari but in IE the page doesn't do anything (Or at least, Doesn't show anything) Ideas Comments? Code: $('.ajax').bind(click, function(e) { e.preventDefault(); var fileName = $(this).attr(href); $('#content').fadeOut('slow',function(){ $(this).load(fileName+' #wrap', function(){ $('#content').fadeIn('slow'); }); }); }); the div id that is loaded is called wrap and the only page that gives me a problem in IE is the one where wrap contains an iframe.- Hide quoted text - - Show quoted text -
[jQuery] Re: Removing all styles from an element-
Even redeclaring all properties in CSS will be much better than using javascript to fix it. Something like #myModule * { margin:0; padding:0; font-family:Arial; color:#000; height:auto; width:auto; font-size:10px; letter-spacing:1; line-height: 1; text-indent:0; overflow:visible; border:0 none; background: #FFF; float:none; clear:none; } Should be enough, then you would just make sure you declare *every* style you need on on your own CSS, even the defaults. If you wanted complete outside styles 'protection', you could load everything inside an iframe. ? On Feb 12, 11:07 am, Nic Luciano adaptive...@gmail.com wrote: I considered it, but because of the ambiguity I run into I just need to specify every single Css property... Thought there might be something clever I could do with jquery but pobably not... Thanks Sent from my iPhone On Feb 12, 2009, at 12:08 AM, Ricardo Tomasi ricardob...@gmail.com wrote: You could a use kind of CSS reset for your container. I usually don't like '*' declarations but this seems fit here: #myModule * { margin:0; padding:0; font-family:Arial; color:#000; height:auto; width:auto } On Feb 11, 11:09 pm, Nic adaptive...@gmail.com wrote: The scenario: I am developing a module that will live on any page it's requested to live on (any website). The issue is that if the website it's on has a broad style definition (ie. p { margin: 20px; }), this will affect my elements (in addition to the styles I define). Is there a way I can ensure that only the styles I apply are used, or to clear all styles of my elements before I apply my own? So if someone has such a definition on their page, it won't effect my module. I know I could explicitly redefine the style myself, but there is no way of telling ahead of time what styles will be defined (without defining every single css property for every single element)- so a catch all would be nice. Thanks, Nichttp://www.twitter.com/nicluciano Sent from my iPhone
[jQuery] Re: Finding the last sibling.
If the input doesn`t exist nothing will be returned with nextAll. Same with jQuery Lover's approach. That's we need to get all the children: $('input').parent().children(':last') or alternatively $('input').siblings().andSelf().filter(':last-child') // I'd bet the other one is faster As Mike Manning pointed out, $(div :last-child) will return all the 'last-child's of all the descendants, not just the children. $(div :last-child) would be it. cheers, - ricardo On Feb 12, 4:19 am, mkmanning michaell...@gmail.com wrote: Somehow the selector disappeared :P $('input').nextAll(':last'); $(this).nextAll(':last'); On Feb 11, 10:17 pm, mkmanning michaell...@gmail.com wrote: $(div :last-child); finds all of the last-child elements, including descendant elements (e.g. if there were an a inside the span in your example it would be returned too). You can also not worry about the parent at all and just use the sibling selector: //or you could use :last-child As Ricardo suggested, you can use 'this' : $(this).nextAll(':last'); On Feb 11, 10:05 pm, Ricardo Tomasi ricardob...@gmail.com wrote: $(this).parent().children(':last') //or :last-child - assuming 'this' is the input element On Feb 12, 3:09 am, Risingfish risingf...@gmail.com wrote: Thanks Nic, How about if I'm using the input tag as the base? Can I do something like $(self:parent:last-child) ? On Feb 11, 8:13 pm, Nic Luciano adaptive...@gmail.com wrote: $(div :last-child); (or this wacky way I tried before I learned CSS selectors $(div).children()[$(div).children().size() - 1])...) Nic Lucianohttp://www.twitter.com/niclucianohttp://www.linkedin.com/in/nicluciano On Wed, Feb 11, 2009 at 9:49 PM, Risingfish risingf...@gmail.com wrote: Hi James, apologize for not being more precise. I'm using the input element as my base reference. So using that input element, I want to get the last sibling under the div. You are correct that if the span is not then the input is what I want. I may need to add more tags later (I'm sure you know hoe the development process goes when customers are involved. :) ), so a reliable way to get the last tag would be nice. Thanks! On Feb 11, 7:21 pm, James james.gp@gmail.com wrote: When you say last sibling in a parent, what does that mean? Which element is your base reference? In your example: div input .. / span.../span /div Do you mean your div is the base reference, and you want to find the last child (thus, span) relative to that? And if span is not there, you want input? On Feb 11, 4:12 pm, Risingfish risingf...@gmail.com wrote: Before I accidentally hit enter, this is what I was trying to type: :) div input .. / span.../span /div The span might or might not be there, so I would like to just get the last sibling in a parent. Thanks!
[jQuery] Re: IE7 Zoom and the cluetip plugin
Well, thank you for the quick answer nevertheless. Anatoli On Feb 11, 6:07 pm, Karl Swedberg k...@englishrules.com wrote: On Feb 11, 2009, at 3:27 AM, astr wrote: Hi, everybody, I have a problem with IE7/Cluetip plugin. IE7 Currupts the tooltips in the jQuery ClueTip plugin if you zoom the page. See, eg., the example on the Cluetip demo page plugins.learningjquery.com/cluetip/demo/ , default style, 9. mouse tracking. Zooming is a good property, though not if it is poorly implemented. It seems to be in IE7 (google confirms), so it is either give up the Cluetip or ignore IE7, unless there is some remedy, which I am not able to find. Has anybody hit on a way out of this problem? The best to all Hi, I'm sorry you're having trouble with this. I wish there were something I could do to fix it, but I'm not sure where to start, to be honest. If anyone else has some suggestions, I'd love to hear them. Not only is the positioning off when you zoom, but that (experimental) example you mention has other problems. Seems that when I move the mouse over the link, the tooltip moves but the text it contains stays put. Very strange. Incidentally, the jQuery UI Dialog has some issues of its own wrt IE7 zooming.http://jqueryui.com/demos/dialog/ I'm guessing this has something to do with how IE7 reports its offsets. Would be interested to hear if others have found solutions. In the meantime, I do some research of my own. Thanks for reporting the problem. Sorry I don't have a quick fix for you. --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com
[jQuery] Re: Tablesorter in Tabs
MorningZ - can you show me any of your pages online, so I can compare code? TIA - Alex On Feb 10, 8:31 pm, MorningZ morni...@gmail.com wrote: Got a public-facing example page? I've got the tablsorter plugin inside ui.tabs on a bunch of pages and have zero problems with them conflicting with each other On Feb 10, 2:46 pm, black.horizons black.horiz...@gmail.com wrote: I've got tablesorter 2.0 sitting in tabs and it's not working, has anybody got any idea why? I've got tablesorter 2.0 also sitting outside tabs (on a different page) and it's working perfectly, so i'm fairly sure that tablesorter 2.0 isn't broke! thanks in advance! alex
[jQuery] Re: Content called using $().load() isn't displaying in IE (content contains an Iframe)
I also tried using an object tag, as that is strict compliant, It still works in FF Safari Opera but It won't load when called through jquery in IE. IS there a force reload? On Feb 12, 8:18 am, mumbojumbo madmediabl...@gmail.com wrote: You got my code down, that's what it does. The iframe is loading different domain, and I'm testing in IE7. I just need to figure this out by the end of the day. This is the problem though, When I load giftcards.html ( the page with the iframe) into my browser it works, but when I ajax load the iframe into another page, it doesn't work in IE7. On Feb 11, 11:28 pm, scottg...@gmail.com scottg...@gmail.com wrote: I'm not 100% clear on what you are asking here but, looking at your code: Looks like if you click on the anchor with class ajax you are loading the href into the #content object. Is the iframe that you are messing with on the same domain? There are a ton of funky security permissions with iframes. Especially for IE6. On Feb 11, 9:44 pm, mumbojumbo madmediabl...@gmail.com wrote: Hello, I have some code that loads content into a div using the .load function in jQuery. Now, the content that is pulled from the page is a in a div and in one of the div's, I have an I frame. The code I have works for FF Opera Safari but in IE the page doesn't do anything (Or at least, Doesn't show anything) Ideas Comments? Code: $('.ajax').bind(click, function(e) { e.preventDefault(); var fileName = $(this).attr(href); $('#content').fadeOut('slow',function(){ $(this).load(fileName+' #wrap', function(){ $('#content').fadeIn('slow'); }); }); }); the div id that is loaded is called wrap and the only page that gives me a problem in IE is the one where wrap contains an iframe.- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text -
[jQuery] Need help to understand jQuery
Hi Guys I am having a tough time getting the hang of jQuery so the best of learning for me is to see my current code in jQuery so I can understand it better. Here is an GET ajax request I make in JS: function GET(link) { // -- Enable Loader Tag setClassName(message, display); // -- Execute xmlhttprequest var xhr = CreateRequest(); xhr.open(GET,link,false); xhr.send(null); try { // -- Check for Custom Exception Message var x = xhr.responseXML.getElementsByTagName(message); if(x != null) { //-Print Exception exception(x[0].childNodes[0].nodeValue); return false; } } catch(e) { // -- No custom exception found, continue as normal if(xhr.status==200) { setClassName(message, setnone); return xhr.responseText; } else if(xhr.status==500) { exception(500); return false; } else if(xhr.status==501) { exception(501); return false; } else if(xhr.status==404) { exception(404); return false; } } } Is it ok if someone could convert it into a jQuery for me ? I have gone through many tutorials but I wouldnt know how to implement it into my code above.
[jQuery] New to JQuery, silly question.
Why does this : $(document).ready(function(){ if($(.leftNav ul li:last).height() 32){ $(.leftNav ul li.last).addClass(lastWithItems); } }) work in 1.3.1 but not this $(document).ready(function(){ if($(.leftNav ul li.last).height() 32){ $(.leftNav ul li.last).addClass(lastWithItems); } }) (Notice the li.last on both lines) ??? Also why isnt it explained anywhere :( Another thing why cant i do this function blabla() { } $(document).ready(blabla()) ? and i have to do $(document).ready(function(){}) From what i recall i could do both things in 1.2.6, now with 1.3.1 those seem to be impossible, also why isnt there any mention on the Jquery doc/tutorial pages? :( Thanks --- Alexandru Dinulescu Web Developer (X)HTML/CSS Specialist Expert Guarantee Certified Developer XHTML: http://www.expertrating.com/transcript.asp?transcriptid=1879053 CSS : http://www.expertrating.com/transcript.asp?transcriptid=1870619 RentACoder Profile: http://www.rentacoder.com/RentACoder/DotNet/SoftwareCoders/ShowBioInfo.aspx?lngAuthorId=6995323 MainWebsite: http://alexd.adore.ro Portofolio: http://alexd.adore.ro/project_page.php
[jQuery] gettng value from radio buttons
Hi, I have two radio buttons, when user click I'd like to know what is value selected now inside updateoptns, but the code below always return '0', any idea how to do this? Thanks, Angelo label for=optns /label input checked=checked class=rb_optns id=rd1 name=optns onClick=updateoptns() type=radio value=0 / /label input id=rd2 name=optns onClick=updateoptns() type=radio value=1 / Metric (kg/cm)/label br clear=none / function updateoptns() { var optns = jQuery(inp...@name='optns']); alert(optns.val()); }
[jQuery] Re: Tablesorter in Tabs
There isn't really anything special to show but looking at your code, i certainly can offer a suggestion: start simple and work your way to complex... in other words, drop the accordian stuff and all that and start off with a basic tabs page, then sort the tables, then add the accordions. i don't see how in all that code you can just say tabs and tablesorter don't work together with all that code going on On Feb 12, 8:59 am, black.horizons black.horiz...@gmail.com wrote: MorningZ - can you show me any of your pages online, so I can compare code? TIA - Alex On Feb 10, 8:31 pm, MorningZ morni...@gmail.com wrote: Got a public-facing example page? I've got the tablsorter plugin inside ui.tabs on a bunch of pages and have zero problems with them conflicting with each other On Feb 10, 2:46 pm, black.horizons black.horiz...@gmail.com wrote: I've got tablesorter 2.0 sitting in tabs and it's not working, has anybody got any idea why? I've got tablesorter 2.0 also sitting outside tabs (on a different page) and it's working perfectly, so i'm fairly sure that tablesorter 2.0 isn't broke! thanks in advance! alex
[jQuery] Re: Need help to understand jQuery
$.ajax({ type: GET, url: some.php, data: name=Johnlocation=Boston, success: function(msg){ alert( Success ); } }); this isn't a direct translation of your js to jquery but this shows the principle. shapo wrote: Hi Guys I am having a tough time getting the hang of jQuery so the best of learning for me is to see my current code in jQuery so I can understand it better. Here is an GET ajax request I make in JS: function GET(link) { // -- Enable Loader Tag setClassName(message, display); // -- Execute xmlhttprequest var xhr = CreateRequest(); xhr.open(GET,link,false); xhr.send(null); try { // -- Check for Custom Exception Message var x = xhr.responseXML.getElementsByTagName(message); if(x != null) { //-Print Exception exception(x[0].childNodes[0].nodeValue); return false; } } catch(e) { // -- No custom exception found, continue as normal if(xhr.status==200) { setClassName(message, setnone); return xhr.responseText; } else if(xhr.status==500) { exception(500); return false; } else if(xhr.status==501) { exception(501); return false; } else if(xhr.status==404) { exception(404); return false; } } } Is it ok if someone could convert it into a jQuery for me ? I have gone through many tutorials but I wouldnt know how to implement it into my code above.
[jQuery] Re: Need help to understand jQuery
But how would I handle the error messages ? I have custom errors for each of the server errors. Then I have a functionality error handler if the server code prints out an exception in XML. On Thu, Feb 12, 2009 at 2:25 PM, Liam Potter radioactiv...@gmail.comwrote: $.ajax({ type: GET, url: some.php, data: name=Johnlocation=Boston, success: function(msg){ alert( Success ); } }); this isn't a direct translation of your js to jquery but this shows the principle. shapo wrote: Hi Guys I am having a tough time getting the hang of jQuery so the best of learning for me is to see my current code in jQuery so I can understand it better. Here is an GET ajax request I make in JS: function GET(link) { // -- Enable Loader Tag setClassName(message, display); // -- Execute xmlhttprequest var xhr = CreateRequest(); xhr.open(GET,link,false); xhr.send(null); try { // -- Check for Custom Exception Message var x = xhr.responseXML.getElementsByTagName(message); if(x != null) { //-Print Exception exception(x[0].childNodes[0].nodeValue); return false; } } catch(e) { // -- No custom exception found, continue as normal if(xhr.status==200) { setClassName(message, setnone); return xhr.responseText; } else if(xhr.status==500) { exception(500); return false; } else if(xhr.status==501) { exception(501); return false; } else if(xhr.status==404) { exception(404); return false; } } } Is it ok if someone could convert it into a jQuery for me ? I have gone through many tutorials but I wouldnt know how to implement it into my code above.
[jQuery] Re: Need help to understand jQuery
$.ajax({ type: GET, url: some.php, data: name=Johnlocation=Boston, success: function(msg){ alert( Success ); } error: function(emsg){ |alert(xhr.statusText); }| }); | | Jack Mack wrote: But how would I handle the error messages ? I have custom errors for each of the server errors. Then I have a functionality error handler if the server code prints out an exception in XML. On Thu, Feb 12, 2009 at 2:25 PM, Liam Potter radioactiv...@gmail.com mailto:radioactiv...@gmail.com wrote: $.ajax({ type: GET, url: some.php, data: name=Johnlocation=Boston, success: function(msg){ alert( Success ); } }); this isn't a direct translation of your js to jquery but this shows the principle. shapo wrote: Hi Guys I am having a tough time getting the hang of jQuery so the best of learning for me is to see my current code in jQuery so I can understand it better. Here is an GET ajax request I make in JS: function GET(link) { // -- Enable Loader Tag setClassName(message, display); // -- Execute xmlhttprequest var xhr = CreateRequest(); xhr.open(GET,link,false); xhr.send(null); try { // -- Check for Custom Exception Message var x = xhr.responseXML.getElementsByTagName(message); if(x != null) { //-Print Exception exception(x[0].childNodes[0].nodeValue); return false; } } catch(e) { // -- No custom exception found, continue as normal if(xhr.status==200) { setClassName(message, setnone); return xhr.responseText; } else if(xhr.status==500) { exception(500); return false; } else if(xhr.status==501) { exception(501); return false; } else if(xhr.status==404) { exception(404); return false; } } } Is it ok if someone could convert it into a jQuery for me ? I have gone through many tutorials but I wouldnt know how to implement it into my code above.
[jQuery] Re: Need help to understand jQuery
Ok, but what would the statusText print out ? And is there any way I can customise the message ? On Thu, Feb 12, 2009 at 2:35 PM, Liam Potter radioactiv...@gmail.comwrote: $.ajax({ type: GET, url: some.php, data: name=Johnlocation=Boston, success: function(msg){ alert( Success ); } error: function(emsg){ |alert(xhr.statusText); }| }); | | Jack Mack wrote: But how would I handle the error messages ? I have custom errors for each of the server errors. Then I have a functionality error handler if the server code prints out an exception in XML. On Thu, Feb 12, 2009 at 2:25 PM, Liam Potter radioactiv...@gmail.commailto: radioactiv...@gmail.com wrote: $.ajax({ type: GET, url: some.php, data: name=Johnlocation=Boston, success: function(msg){ alert( Success ); } }); this isn't a direct translation of your js to jquery but this shows the principle. shapo wrote: Hi Guys I am having a tough time getting the hang of jQuery so the best of learning for me is to see my current code in jQuery so I can understand it better. Here is an GET ajax request I make in JS: function GET(link) { // -- Enable Loader Tag setClassName(message, display); // -- Execute xmlhttprequest var xhr = CreateRequest(); xhr.open(GET,link,false); xhr.send(null); try { // -- Check for Custom Exception Message var x = xhr.responseXML.getElementsByTagName(message); if(x != null) { //-Print Exception exception(x[0].childNodes[0].nodeValue); return false; } } catch(e) { // -- No custom exception found, continue as normal if(xhr.status==200) { setClassName(message, setnone); return xhr.responseText; } else if(xhr.status==500) { exception(500); return false; } else if(xhr.status==501) { exception(501); return false; } else if(xhr.status==404) { exception(404); return false; } } } Is it ok if someone could convert it into a jQuery for me ? I have gone through many tutorials but I wouldnt know how to implement it into my code above.
[jQuery] Re: Need help to understand jQuery
My knowledge of the ajax functions of jquery are rather limited to be honest, I deal with the frontend aspects mainly. I don't know if this would work, I assume it would. There are a few regulars on this list who could help you with this a lot better then I can. $.ajax({ type: GET, url: some.php, data: name=Johnlocation=Boston, success: function(msg){ alert( Success ); } error: function(emsg){ if(xhr.status==200) { alert(custom message); } else if(xhr.status==500) { alert(custom message); } else if(xhr.status==501) { alert(custom message); } else if(xhr.status==404) { alert(custom message); } } }); Jack Mack wrote: Ok, but what would the statusText print out ? And is there any way I can customise the message ? On Thu, Feb 12, 2009 at 2:35 PM, Liam Potter radioactiv...@gmail.com mailto:radioactiv...@gmail.com wrote: $.ajax({ type: GET, url: some.php, data: name=Johnlocation=Boston, success: function(msg){ alert( Success ); } error: function(emsg){ |alert(xhr.statusText); }| }); | | Jack Mack wrote: But how would I handle the error messages ? I have custom errors for each of the server errors. Then I have a functionality error handler if the server code prints out an exception in XML. On Thu, Feb 12, 2009 at 2:25 PM, Liam Potter radioactiv...@gmail.com mailto:radioactiv...@gmail.com mailto:radioactiv...@gmail.com mailto:radioactiv...@gmail.com wrote: $.ajax({ type: GET, url: some.php, data: name=Johnlocation=Boston, success: function(msg){ alert( Success ); } }); this isn't a direct translation of your js to jquery but this shows the principle. shapo wrote: Hi Guys I am having a tough time getting the hang of jQuery so the best of learning for me is to see my current code in jQuery so I can understand it better. Here is an GET ajax request I make in JS: function GET(link) { // -- Enable Loader Tag setClassName(message, display); // -- Execute xmlhttprequest var xhr = CreateRequest(); xhr.open(GET,link,false); xhr.send(null); try { // -- Check for Custom Exception Message var x = xhr.responseXML.getElementsByTagName(message); if(x != null) { //-Print Exception exception(x[0].childNodes[0].nodeValue); return false; } } catch(e) { // -- No custom exception found, continue as normal if(xhr.status==200) { setClassName(message, setnone); return xhr.responseText; } else if(xhr.status==500) { exception(500); return false; } else if(xhr.status==501) { exception(501); return false; } else if(xhr.status==404) { exception(404); return false; } } } Is it ok if someone could convert it into a jQuery for me ? I have gone through many tutorials but I wouldnt know how to implement it into my code above.
[jQuery] jquery / ajax
Hi, i got a radio button. if this radio button is checked it shell send the value of the button to a .php document. didn't used ajax at all so i don't know how to do this. at the moment i tried something like this: $(:radio).click(function() { $(#infoding).css(display,block); var value = $(this).val(); $.ajax({ type: POST, url: some.php, data: value, success: function(msg){ alert( Data Saved: + value ); } }); }); got it out of some documentation but don't know if it would work 'cause i'm not able to test it at the moment. i'd like to know if this would work and if not how it could work. i'd be happy about any help. thanks -weidc
[jQuery] Re: how to differentiate between click and dragend events?
Thank you peter, that's very helpful. Thank u nic as well. On Feb 12, 2:54 am, Peter Edwards p...@bjorsq.net wrote: the event order is mousedown-mouseup-click the 'dragend' event is triggered by mouseup, which happens before the click event, so if you put logic in your function dragged() to prevent clicked() from doing whatever it does, then the click event which is triggered at the end of a drag should be neutralised. The following approach uses a global boolean variable as a switch. var afterDrag = false function draggged() { afterDrag = true; } function clicked(){ if (afterDrag) { afterDrag = false; return; } } Another approach would be to cancel events in the dragged() function somehow, but my knowledge of the event model doesn't extend that far (can a mouseup event cancel the click event which follows it?) on 12/02/2009 00:43 legofish said:: no takers? On Feb 11, 1:54 pm, legofish pen...@gmail.com wrote: Hi, I am using the drag plugin (http://blog.threedubmedia.com/2008/08/ eventspecialdrag.html) to design some interactions for a UI element. The element foo, needs to respond to a click, as well as to a drag (different responses for each). The plugin gives you handy drag events to work with. So I have: $(#foo).bind('dragend', function(e){ dragged() }); $(#foo).bind('click', function(e){ clicked() }); When foo is simply clicked on, then clicked() is executed and all is well. However, when foo is dragged, dragged() is called and right after that clicked() is called as well. I don't want clicked() to be called when foo is dragged, but I can't seem to figure out how to avoid that. Help is much appreciated.
[jQuery] Re: jquery / ajax
you can test if it would work using firebug, just check the net tab for activity from the page to some.php weidc wrote: Hi, i got a radio button. if this radio button is checked it shell send the value of the button to a .php document. didn't used ajax at all so i don't know how to do this. at the moment i tried something like this: $(:radio).click(function() { $(#infoding).css(display,block); var value = $(this).val(); $.ajax({ type: POST, url: some.php, data: value, success: function(msg){ alert( Data Saved: + value ); } }); }); got it out of some documentation but don't know if it would work 'cause i'm not able to test it at the moment. i'd like to know if this would work and if not how it could work. i'd be happy about any help. thanks -weidc
[jQuery] Re: gettng value from radio buttons
Hi! You could do it like this: $(document).ready(function(){ $('input:radio[name=\'optns\']').click(function() { var optns = $(this).val(); alert (optns); }); }); You'll have to remove your onclick-s then. On Feb 12, 3:22 pm, angelochen...@gmail.com angelochen...@gmail.com wrote: Hi, I have two radio buttons, when user click I'd like to know what is value selected now inside updateoptns, but the code below always return '0', any idea how to do this? Thanks, Angelo label for=optns /label input checked=checked class=rb_optns id=rd1 name=optns onClick=updateoptns() type=radio value=0 / /label input id=rd2 name=optns onClick=updateoptns() type=radio value=1 / Metric (kg/cm)/label br clear=none / function updateoptns() { var optns = jQuery(inp...@name='optns']); alert(optns.val()); }
[jQuery] jquery s3slider and Magento
I've been trying to use the great s3slider on a magento web site. It almost works. When I say almost, it means that I managed to add the jquery library and make it work. On my page I get the first slide but not the others. It seems that it's stuck on the first one. When I look at the code of the page, the second slide is there (these slides are created dynamically via php) but it doesn't appear. When I refresh the page the second slide appears but not the first. here is the link : http://p109.phpnet.org can someone help me fix this. regards, Damien Hirlimann
[jQuery] Re: Access tabs from an iframe to another.
I made an example that simulate the strange behaviour. It is possible to download it here http://m4zi.ucoz.com/tabs.zip I made a test case that works: it's possible run it opening containerTabs.htm indexContainer.html contains the test case that does not work. It seems that accessing from an iframe to another iframe where is defined the tabs is impossible. I can access any other elements in the iframe that contains the tabs but the tabs. Any idea? Kind regards. Massimo On Feb 9, 7:45 pm, m.ugues m.ug...@gmail.com wrote: Hallo all. I got a problem accessing .ui-tabs-nav defined in an iframe from another one. I have a index page where I define an iframe: inside the iframe is loaded a page where are defined the tabs. http://pastie.org/384171 In index.html there is this piece of code http://pastie.org/384170 Then I load a modal dialog with an iframe inside (using jquery DOMwindow); now that i got this iframe I need to change the tab content, but i cannot access the tab class to do it. Normally inside the iframe where are defined the tabs I use this piece of code to reload a tabhttp://pastie.org/384176 I tried different ways to do the same thing in the other iframe as described herehttp://pastie.org/384179but with no result. Any idea how to solve this problem? Kind regards Massimo UGues
[jQuery] Re: jquery s3slider and Magento
put div class=clear sliderImage/div before the /ul Anatalsceo wrote: I've been trying to use the great s3slider on a magento web site. It almost works. When I say almost, it means that I managed to add the jquery library and make it work. On my page I get the first slide but not the others. It seems that it's stuck on the first one. When I look at the code of the page, the second slide is there (these slides are created dynamically via php) but it doesn't appear. When I refresh the page the second slide appears but not the first. here is the link : http://p109.phpnet.org can someone help me fix this. regards, Damien Hirlimann
[jQuery] Re: New to JQuery, silly question.
For the first part of your post li:last gets the last li in the given ul li.last gets any li with the class of last For the second part of your post, your syntax is wrong $(document).ready(blabla) (note the lack of () after the function name) On Feb 12, 8:59 am, Alexandru Dinulescu alex.d.a...@gmail.com wrote: Why does this : $(document).ready(function(){ if($(.leftNav ul li:last).height() 32){ $(.leftNav ul li.last).addClass(lastWithItems); } }) work in 1.3.1 but not this $(document).ready(function(){ if($(.leftNav ul li.last).height() 32){ $(.leftNav ul li.last).addClass(lastWithItems); } }) (Notice the li.last on both lines) ??? Also why isnt it explained anywhere :( Another thing why cant i do this function blabla() { } $(document).ready(blabla()) ? and i have to do $(document).ready(function(){}) From what i recall i could do both things in 1.2.6, now with 1.3.1 those seem to be impossible, also why isnt there any mention on the Jquery doc/tutorial pages? :( Thanks --- Alexandru Dinulescu Web Developer (X)HTML/CSS Specialist Expert Guarantee Certified Developer XHTML:http://www.expertrating.com/transcript.asp?transcriptid=1879053 CSS :http://www.expertrating.com/transcript.asp?transcriptid=1870619 RentACoder Profile:http://www.rentacoder.com/RentACoder/DotNet/SoftwareCoders/ShowBioInf... MainWebsite:http://alexd.adore.ro Portofolio:http://alexd.adore.ro/project_page.php
[jQuery] Re: jquery s3slider and Magento
thanks. On 12 fév, 16:37, Liam Potter radioactiv...@gmail.com wrote: put div class=clear sliderImage/div before the /ul Anatalsceo wrote: I've been trying to use the great s3slider on a magento web site. It almost works. When I say almost, it means that I managed to add the jquery library and make it work. On my page I get the first slide but not the others. It seems that it's stuck on the first one. When I look at the code of the page, the second slide is there (these slides are created dynamically via php) but it doesn't appear. When I refresh the page the second slide appears but not the first. here is the link : http://p109.phpnet.org can someone help me fix this. regards, Damien Hirlimann
[jQuery] Re: jeditable addition of checkboxes, doubleclick to select.
I'm trying to keep from having a check box need a double click to become selected. It seems the base behavior in jeditable is that one click opens an item for editing, and one click (or typing) allows the edits to occur. In the case of a checkbox a double click is not an expected behavior for a standard user so this can be confusing for them. In the even that they are selecting multiple checkboxes in succession is becomes more so. I pulled the latest version of jeditable from github last night and updated my core so I am on the edge. I will try adding in this snippet also. On Feb 12, 2009, at 12:27 AM, Mika Tuupola wrote: On Feb 11, 2009, at 7:13 PM, Brian Loomis wrote: Unfortunately I am not able to get the checkbox to select without first selecting the containing element (which has the appearance of having to get the checkbox a double click to check it) However - the checkbox unselects with only one click. I do not have to click the containing element to get this behavior. I would like to get the checkbox to select with one click - before my designer whomps me with the usability paddle and makes me do a tear out and use standard forms. Sorry but I do not understand your explanation what you are trying to do. Do you want the checkbox to be automatically checked when you click editable element and the checkbox appears? You could try adding this to you custom input code: -cut- plugin : function(settings, original) { $(input, this).attr(checked, true); }, -cut- You need to set checked in plugin method instead of element because browsers are a bit touchy when value of input is set. -- Mika Tuupola http://www.appelsiini.net/
[jQuery] uncheck specific checkbox
Hey guys, I'm trying to uncheck a checkbox that is inside my flexigrid. I have a checkbox in the header and the column has all checkboxes. What I'm trying to do is if I select the top checkbox (so all of the checkboxes below are selected), I would like to uncheck that checkbox if any of the other checkboxes in that column are unchecked. I'm using the following code, but when it runs through this, it unselects all of the items, instead of just the header. Code snippet: var rItem = document.getElementById(chk_col_ + colName); $(inp...@name= + rItem.name + ][type='checkbox']).attr('checked', false); The checkbox is named correctly, so I'm not sure why this isn't working. Thanks!
[jQuery] (SOLVED) Re: Superfish - Entire menu flickers on hover
This javascript fixes this problem with IE6 background image caching: try { document.execCommand('BackgroundImageCache', false, true); } catch(e) {}
[jQuery] Re: Finding the last sibling.
If the input doesn't exist, then wouldn't nothing be returned with $ ('input').parent().children(':last') either? It seems to presume the existence of the input :) Maybe you meant if the input doesn't have siblings, then nothing is returned, which is true using nextAll(). Using 'input' with no extra identifier also means that this would grab all inputs on the page, which may not be desirable. If the input has an identifier, then you could also do something like this: $('input#foo').nextAll(':last').add('input#foo:only-child'); or from your example markup you could do: $('div input').nextAll(':last').add('div input:only-child'); //fnb it would grab all inputs in all divs This will get the last sibling if there is one, and add the input if it's an only child. Btw, lest somebody think otherwise, I'm not opposed to traversing up to the parent at all, I just wanted to continue pursuing the idea without it for fun :) Rereading the original post makes me question where the emphasis is The span might or might not be there, so I would like to just get the last sibling in a parent. If you're coming from the perspective of the parent and not the input, then just doing: $('div').children(':last'); is all you'd really need. Starting from the perspective of the input you have several choices, which is what makes jQuery so much fun: there's always more than one way to accomplish some task! It's left to you to figure out what is optimal (overall or in your particular situation), and that will have to consider speed, legibility for other coders, isolation from structure, etc. On Feb 12, 5:30 am, Ricardo Tomasi ricardob...@gmail.com wrote: If the input doesn`t exist nothing will be returned with nextAll. Same with jQuery Lover's approach. That's we need to get all the children: $('input').parent().children(':last') or alternatively $('input').siblings().andSelf().filter(':last-child') // I'd bet the other one is faster As Mike Manning pointed out, $(div :last-child) will return all the 'last-child's of all the descendants, not just the children. $(div :last-child) would be it. cheers, - ricardo On Feb 12, 4:19 am, mkmanning michaell...@gmail.com wrote: Somehow the selector disappeared :P $('input').nextAll(':last'); $(this).nextAll(':last'); On Feb 11, 10:17 pm, mkmanning michaell...@gmail.com wrote: $(div :last-child); finds all of the last-child elements, including descendant elements (e.g. if there were an a inside the span in your example it would be returned too). You can also not worry about the parent at all and just use the sibling selector: //or you could use :last-child As Ricardo suggested, you can use 'this' : $(this).nextAll(':last'); On Feb 11, 10:05 pm, Ricardo Tomasi ricardob...@gmail.com wrote: $(this).parent().children(':last') //or :last-child - assuming 'this' is the input element On Feb 12, 3:09 am, Risingfish risingf...@gmail.com wrote: Thanks Nic, How about if I'm using the input tag as the base? Can I do something like $(self:parent:last-child) ? On Feb 11, 8:13 pm, Nic Luciano adaptive...@gmail.com wrote: $(div :last-child); (or this wacky way I tried before I learned CSS selectors $(div).children()[$(div).children().size() - 1])...) Nic Lucianohttp://www.twitter.com/niclucianohttp://www.linkedin.com/in/nicluciano On Wed, Feb 11, 2009 at 9:49 PM, Risingfish risingf...@gmail.com wrote: Hi James, apologize for not being more precise. I'm using the input element as my base reference. So using that input element, I want to get the last sibling under the div. You are correct that if the span is not then the input is what I want. I may need to add more tags later (I'm sure you know hoe the development process goes when customers are involved. :) ), so a reliable way to get the last tag would be nice. Thanks! On Feb 11, 7:21 pm, James james.gp@gmail.com wrote: When you say last sibling in a parent, what does that mean? Which element is your base reference? In your example: div input .. / span.../span /div Do you mean your div is the base reference, and you want to find the last child (thus, span) relative to that? And if span is not there, you want input? On Feb 11, 4:12 pm, Risingfish risingf...@gmail.com wrote: Before I accidentally hit enter, this is what I was trying to type: :) div input .. / span.../span /div The span might or might not be there, so I would like to just get the last sibling in a parent. Thanks!
[jQuery] Re: jeditable addition of checkboxes, doubleclick to select.
Mika, I tried adding this to the latest jeditable build from github @ line 237 where the plugin settings were included. This had the effect of breaking jeditable as a whole. I then tried it near the bottom where I have added in the new plugin feature for checkboxes: // Create a custom input type for checkboxes $.editable.addInputType(checkbox, { element : function(settings, original) { var input = $('input type=checkbox'); $(this).append(input); // Update input's value when clicked $(input).click(function() { var value = $(input).attr(checked) ? 'Yes' : 'No'; $(input).val(value); }); return(input); }, content : function(string, settings, original) { var checked = string == Yes ? 1 : 0; var input = $(':input:first', this); $(input).attr(checked, checked); var value = $(input).attr(checked) ? 'Yes' : 'No'; $(input).val(value); } }); By making this change: $.editable.addInputType(checkbox, { element : function(settings, original) { var input = $('input type=checkbox'); $(this).append(input); // Update input's value when clicked $(input).click(function() { var value = $(input).attr(checked) ? 'Yes' : 'No'; $(input).val(value); }); return(input); }, content : function(string, settings, original) { var checked = string == Yes ? 1 : 0; var input = $(':input:first', this); $(input).attr(checked, checked); var value = $(input).attr(checked) ? 'Yes' : 'No'; $(input).val(value); } plugin : function(settings, original) { $(input, this).attr(checked, true); }, However I had no luck here as well. What I've got is great except for the whole double click thing to edit a check box. So figuring I have the chainability wrong I tried this adding in just the snippet: // Create a custom input type for checkboxes $.editable.addInputType(checkbox, { element : function(settings, original) { $(input, this).attr(checked, true); var input = $('input type=checkbox'); $(this).append(input); // Update input's value when clicked $(input).click(function() { var value = $(input).attr(checked) ? 'Yes' : 'No'; $(input).val(value); }); return(input); },
[jQuery] Re: Looking for a certain JQuery Plug-in
Look this example http://jquery.bassistance.de/validate/demo/milk/ http://plugins.jquery.com/project/validate On Thu, Feb 12, 2009 at 01:36, expresso dschin...@gmail.com wrote: I'm looking for a JQuery Validation control that will allow us to show a small image if a form field is valid. So for instance a user is filling out a form..tabs to the next form field. The previous form field will show to the right of the field a little icon signifying that it's a valid entry. I've looked at all the controls in the JQuery Plugin page and don't see one that will allow me to do this. Anyone here know of one or a way using a plugin to modify it and show a pic like this during validation? -- View this message in context: http://www.nabble.com/Looking-for-a-certain-JQuery-Plug-in-tp21969385s27240p21969385.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Chrome and rending dimensions differently?
Not strictly jQuery...but has anyone else noticed that Chrome renders some dimensions different from Firefox and IE? For example, a positioned DIV overlay (positioned using jQuery) will be offset by a certain amount in Chrome from Firefox. Or a DIV is not as wide as it is in Firefox, causing some of the content to break to a new line. Thanks.
[jQuery] Re: uncheck specific checkbox
Hi! The thing is that somwhow (don't ask me why) the unchecked attribute of a checkbox is '' instead of 'false'. This worked fine with me: HTML: input class=parentcheckbox type=checkbox checked=true name=cb01/input input class=childcheckbox type=checkbox checked=true name=cb02/input input class=childcheckbox type=checkbox checked=true name=cb03/input input class=childcheckbox type=checkbox checked=true name=cb04/input jQuery: $(document).ready(function(){ $('.childcheckbox').change(function(){ $(this).prev('.parentcheckbox').attr('checked',''); }); }); On Feb 12, 4:57 pm, Andy adharb...@gmail.com wrote: Hey guys, I'm trying to uncheck a checkbox that is inside my flexigrid. I have a checkbox in the header and the column has all checkboxes. What I'm trying to do is if I select the top checkbox (so all of the checkboxes below are selected), I would like to uncheck that checkbox if any of the other checkboxes in that column are unchecked. I'm using the following code, but when it runs through this, it unselects all of the items, instead of just the header. Code snippet: var rItem = document.getElementById(chk_col_ + colName); $(inp...@name= + rItem.name + ][type='checkbox']).attr('checked', false); The checkbox is named correctly, so I'm not sure why this isn't working. Thanks!
[jQuery] Re: New to JQuery, silly question.
Yes but in that case the last element is the one with the .last classname so they are identical in meaning (they both refer to the same element) so why it's not working ? --- Alexandru Dinulescu Web Developer (X)HTML/CSS Specialist Expert Guarantee Certified Developer XHTML: http://www.expertrating.com/transcript.asp?transcriptid=1879053 CSS : http://www.expertrating.com/transcript.asp?transcriptid=1870619 RentACoder Profile: http://www.rentacoder.com/RentACoder/DotNet/SoftwareCoders/ShowBioInfo.aspx?lngAuthorId=6995323 MainWebsite: http://alexd.adore.ro Portofolio: http://alexd.adore.ro/project_page.php On Thu, Feb 12, 2009 at 5:40 PM, MorningZ morni...@gmail.com wrote: For the first part of your post li:last gets the last li in the given ul li.last gets any li with the class of last For the second part of your post, your syntax is wrong $(document).ready(blabla) (note the lack of () after the function name) On Feb 12, 8:59 am, Alexandru Dinulescu alex.d.a...@gmail.com wrote: Why does this : $(document).ready(function(){ if($(.leftNav ul li:last).height() 32){ $(.leftNav ul li.last).addClass(lastWithItems); } }) work in 1.3.1 but not this $(document).ready(function(){ if($(.leftNav ul li.last).height() 32){ $(.leftNav ul li.last).addClass(lastWithItems); } }) (Notice the li.last on both lines) ??? Also why isnt it explained anywhere :( Another thing why cant i do this function blabla() { } $(document).ready(blabla()) ? and i have to do $(document).ready(function(){}) From what i recall i could do both things in 1.2.6, now with 1.3.1 those seem to be impossible, also why isnt there any mention on the Jquery doc/tutorial pages? :( Thanks --- Alexandru Dinulescu Web Developer (X)HTML/CSS Specialist Expert Guarantee Certified Developer XHTML:http://www.expertrating.com/transcript.asp?transcriptid=1879053 CSS :http://www.expertrating.com/transcript.asp?transcriptid=1870619 RentACoder Profile: http://www.rentacoder.com/RentACoder/DotNet/SoftwareCoders/ShowBioInf... MainWebsite:http://alexd.adore.ro Portofolio:http://alexd.adore.ro/project_page.php
[jQuery] Re: New to JQuery, silly question.
Also i didnt say this I said function blabla() { } $(document).ready(blabla()) ? So all the parantheses are where they belong... --- Alexandru Dinulescu Web Developer (X)HTML/CSS Specialist Expert Guarantee Certified Developer XHTML: http://www.expertrating.com/transcript.asp?transcriptid=1879053 CSS : http://www.expertrating.com/transcript.asp?transcriptid=1870619 RentACoder Profile: http://www.rentacoder.com/RentACoder/DotNet/SoftwareCoders/ShowBioInfo.aspx?lngAuthorId=6995323 MainWebsite: http://alexd.adore.ro Portofolio: http://alexd.adore.ro/project_page.php On Thu, Feb 12, 2009 at 5:40 PM, MorningZ morni...@gmail.com wrote: For the first part of your post li:last gets the last li in the given ul li.last gets any li with the class of last For the second part of your post, your syntax is wrong $(document).ready(blabla) (note the lack of () after the function name) On Feb 12, 8:59 am, Alexandru Dinulescu alex.d.a...@gmail.com wrote: Why does this : $(document).ready(function(){ if($(.leftNav ul li:last).height() 32){ $(.leftNav ul li.last).addClass(lastWithItems); } }) work in 1.3.1 but not this $(document).ready(function(){ if($(.leftNav ul li.last).height() 32){ $(.leftNav ul li.last).addClass(lastWithItems); } }) (Notice the li.last on both lines) ??? Also why isnt it explained anywhere :( Another thing why cant i do this function blabla() { } $(document).ready(blabla()) ? and i have to do $(document).ready(function(){}) From what i recall i could do both things in 1.2.6, now with 1.3.1 those seem to be impossible, also why isnt there any mention on the Jquery doc/tutorial pages? :( Thanks --- Alexandru Dinulescu Web Developer (X)HTML/CSS Specialist Expert Guarantee Certified Developer XHTML:http://www.expertrating.com/transcript.asp?transcriptid=1879053 CSS :http://www.expertrating.com/transcript.asp?transcriptid=1870619 RentACoder Profile: http://www.rentacoder.com/RentACoder/DotNet/SoftwareCoders/ShowBioInf... MainWebsite:http://alexd.adore.ro Portofolio:http://alexd.adore.ro/project_page.php
[jQuery] Re: New to JQuery, silly question.
So all the parantheses are where they belong.. you should not use () in the document.ready line $(document).ready(blabla()) won't work $(document).ready(blabla) will work On Feb 12, 11:32 am, Alexandru Dinulescu alex.d.a...@gmail.com wrote: Also i didnt say this I said function blabla() { } $(document).ready(blabla()) ? So all the parantheses are where they belong... --- Alexandru Dinulescu Web Developer (X)HTML/CSS Specialist Expert Guarantee Certified Developer XHTML:http://www.expertrating.com/transcript.asp?transcriptid=1879053 CSS :http://www.expertrating.com/transcript.asp?transcriptid=1870619 RentACoder Profile:http://www.rentacoder.com/RentACoder/DotNet/SoftwareCoders/ShowBioInf... MainWebsite:http://alexd.adore.ro Portofolio:http://alexd.adore.ro/project_page.php On Thu, Feb 12, 2009 at 5:40 PM, MorningZ morni...@gmail.com wrote: For the first part of your post li:last gets the last li in the given ul li.last gets any li with the class of last For the second part of your post, your syntax is wrong $(document).ready(blabla) (note the lack of () after the function name) On Feb 12, 8:59 am, Alexandru Dinulescu alex.d.a...@gmail.com wrote: Why does this : $(document).ready(function(){ if($(.leftNav ul li:last).height() 32){ $(.leftNav ul li.last).addClass(lastWithItems); } }) work in 1.3.1 but not this $(document).ready(function(){ if($(.leftNav ul li.last).height() 32){ $(.leftNav ul li.last).addClass(lastWithItems); } }) (Notice the li.last on both lines) ??? Also why isnt it explained anywhere :( Another thing why cant i do this function blabla() { } $(document).ready(blabla()) ? and i have to do $(document).ready(function(){}) From what i recall i could do both things in 1.2.6, now with 1.3.1 those seem to be impossible, also why isnt there any mention on the Jquery doc/tutorial pages? :( Thanks --- Alexandru Dinulescu Web Developer (X)HTML/CSS Specialist Expert Guarantee Certified Developer XHTML:http://www.expertrating.com/transcript.asp?transcriptid=1879053 CSS :http://www.expertrating.com/transcript.asp?transcriptid=1870619 RentACoder Profile: http://www.rentacoder.com/RentACoder/DotNet/SoftwareCoders/ShowBioInf... MainWebsite:http://alexd.adore.ro Portofolio:http://alexd.adore.ro/project_page.php
[jQuery] Re: uncheck specific checkbox
In HTML checked is a boolean (of sorts), its presence is sufficient, you don't need to set it to anything; if you want something unchecked you should remove the 'checked' attribute. In XHTML, attribute minimization is forbidden (i.e. attributes can't be empty), so the proper syntax is checked=checked (for disabled it's disabled=disabled, etc.) Use removeAttr() instead of setting the value to false. On Feb 12, 8:26 am, Frederik Ring frederik.r...@gmail.com wrote: Hi! The thing is that somwhow (don't ask me why) the unchecked attribute of a checkbox is '' instead of 'false'. This worked fine with me: HTML: input class=parentcheckbox type=checkbox checked=true name=cb01/input input class=childcheckbox type=checkbox checked=true name=cb02/input input class=childcheckbox type=checkbox checked=true name=cb03/input input class=childcheckbox type=checkbox checked=true name=cb04/input jQuery: $(document).ready(function(){ $('.childcheckbox').change(function(){ $(this).prev('.parentcheckbox').attr('checked',''); }); }); On Feb 12, 4:57 pm, Andy adharb...@gmail.com wrote: Hey guys, I'm trying to uncheck a checkbox that is inside my flexigrid. I have a checkbox in the header and the column has all checkboxes. What I'm trying to do is if I select the top checkbox (so all of the checkboxes below are selected), I would like to uncheck that checkbox if any of the other checkboxes in that column are unchecked. I'm using the following code, but when it runs through this, it unselects all of the items, instead of just the header. Code snippet: var rItem = document.getElementById(chk_col_ + colName); $(inp...@name= + rItem.name + ][type='checkbox']).attr('checked', false); The checkbox is named correctly, so I'm not sure why this isn't working. Thanks!
[jQuery] Re: add a child node using jQuery
Hi Alain, I assume you want to wrap the thead node around the first table row. $('table tr:first').wrap('thead/thead'); If that doesn't do it then post your table html and where exactly you want to add thead Paul On Feb 11, 5:58 pm, Alain Roger raf.n...@gmail.com wrote: Hi, i have a table tage and i would like to add a thead node using jQuery. what is the best method in order to get tablethead.../thead/table ? thx -- Alain --- Windows XP x64 SP2 / Fedora 10 KDE 4.2 PostgreSQL 8.3.5 / MS SQL server 2005 Apache 2.2.10 PHP 5.2.6 C# 2005-2008
[jQuery] Ben Nadel jQuery Presentation
http://www.bennadel.com/blog/1492-An-Intensive-Exploration-Of-jQuery-With-Ben-Nadel-Video-Presentation-.htm Very interesting presentation, especially what he talks about in Slide 4 about his initial fears using jQuery and slide5 about the developer point of view. This is very much a backend programmer speaking to other backend programmers. It won't sway everyone, but it's interesting to hear because Ben is extremely open about his feelings in his jQuery path. Ben is a well-known Cold Fusion Developer. Glen
[jQuery] Getting data from the corresponding column. (HTML Table with thead and tbody section.)
In this code, I would like to edit the function to get not only the value of the item clicked, I would also like to get information from the thead section for the corresponding column. For example when I click on tBody-1B I would like it to get the value of tHead-1B or if I click on tBody-3C I would like to to also get the value of tHead-1C. !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en head titleWLVAC Cadets Member List/title style table, thead, tbody, tfoot, tr, th, td { border-collapse: collapse; border: 1px SOLID; padding: 10px 10px 10px 10px; } /style script src=http://jqueryjs.googlecode.com/files/ jquery-1.3.1.min.js type=text/javascript/script script type=text/javascript $(function() { $('tbody td').click(function(e) { var innerHTML = $(this).get(0).innerHTML; alert(innerHTML); }) }); /script /head body table thead tr thtHead-1A/th tdtHead-1B/td tdtHead-1C/td tdtHead-1D/td /tr /thead tbody tr thtBody-1A/th tdtBody-1B/td tdtBody-1C/td tdtBody-1D/td /tr tr thtBody-2A/th tdtBody-2B/td tdtBody-2C/td tdtBody-2D/td /tr tr thtBody-3A/th tdtBody-3B/td tdtBody-3C/td tdtBody-3D/td /tr tr thtBody-4A/th tdtBody-4B/td tdtBody-4C/td tdtBody-4D/td /tr /tbody /table /body /html
[jQuery] Re: Status Codes = docs
On Wednesday 11 February 2009, Nic Luciano wrote: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html Something like this? I might be misunderstanding your question, but I don't think statuses and datatypes are related if that's what you mean. Status codes (linked) are the status of the call.. (ie. a return status of 200 means everything went OK). Data type is the format of the data you are expecting to return (html for plain html to insert into your document, json for js objects, etc)... Sorry. To clarify, I wanted ed to know if numerical statuses via the w3 protocol or text strings were being returned. I just did my first successful ajax call using jquery and the status returned in the callback was success, not 200. I hope the question is clearer now. thanks tim
[jQuery] Re: New to JQuery, silly question.
So this should work right? function blabla() { } $(document).ready(blabla); --- Any info why the li:last and li.last do not work? the html was something like this ul liTest Test Test /li liTest Test Test /li li class=lastTest Test Test /li /ul so li.last and li:last equal the same thing Thanks for all the info so far --- Alexandru Dinulescu Web Developer (X)HTML/CSS Specialist Expert Guarantee Certified Developer XHTML: http://www.expertrating.com/transcript.asp?transcriptid=1879053 CSS : http://www.expertrating.com/transcript.asp?transcriptid=1870619 RentACoder Profile: http://www.rentacoder.com/RentACoder/DotNet/SoftwareCoders/ShowBioInfo.aspx?lngAuthorId=6995323 MainWebsite: http://alexd.adore.ro Portofolio: http://alexd.adore.ro/project_page.php On Thu, Feb 12, 2009 at 6:38 PM, MorningZ morni...@gmail.com wrote: So all the parantheses are where they belong.. you should not use () in the document.ready line $(document).ready(blabla()) won't work $(document).ready(blabla) will work On Feb 12, 11:32 am, Alexandru Dinulescu alex.d.a...@gmail.com wrote: Also i didnt say this I said function blabla() { } $(document).ready(blabla()) ? So all the parantheses are where they belong... --- Alexandru Dinulescu Web Developer (X)HTML/CSS Specialist Expert Guarantee Certified Developer XHTML:http://www.expertrating.com/transcript.asp?transcriptid=1879053 CSS :http://www.expertrating.com/transcript.asp?transcriptid=1870619 RentACoder Profile: http://www.rentacoder.com/RentACoder/DotNet/SoftwareCoders/ShowBioInf... MainWebsite:http://alexd.adore.ro Portofolio:http://alexd.adore.ro/project_page.php On Thu, Feb 12, 2009 at 5:40 PM, MorningZ morni...@gmail.com wrote: For the first part of your post li:last gets the last li in the given ul li.last gets any li with the class of last For the second part of your post, your syntax is wrong $(document).ready(blabla) (note the lack of () after the function name) On Feb 12, 8:59 am, Alexandru Dinulescu alex.d.a...@gmail.com wrote: Why does this : $(document).ready(function(){ if($(.leftNav ul li:last).height() 32){ $(.leftNav ul li.last).addClass(lastWithItems); } }) work in 1.3.1 but not this $(document).ready(function(){ if($(.leftNav ul li.last).height() 32){ $(.leftNav ul li.last).addClass(lastWithItems); } }) (Notice the li.last on both lines) ??? Also why isnt it explained anywhere :( Another thing why cant i do this function blabla() { } $(document).ready(blabla()) ? and i have to do $(document).ready(function(){}) From what i recall i could do both things in 1.2.6, now with 1.3.1 those seem to be impossible, also why isnt there any mention on the Jquery doc/tutorial pages? :( Thanks --- Alexandru Dinulescu Web Developer (X)HTML/CSS Specialist Expert Guarantee Certified Developer XHTML: http://www.expertrating.com/transcript.asp?transcriptid=1879053 CSS :http://www.expertrating.com/transcript.asp?transcriptid=1870619 RentACoder Profile: http://www.rentacoder.com/RentACoder/DotNet/SoftwareCoders/ShowBioInf. .. MainWebsite:http://alexd.adore.ro Portofolio:http://alexd.adore.ro/project_page.php
[jQuery] Re: New to JQuery, silly question.
Hi Alexandru, I cannot see any reason why li.last would not work, as it would be no different then selecting any li with any class. Alexandru Dinulescu wrote: So this should work right? function blabla() { } $(document).ready(blabla); --- Any info why the li:last and li.last do not work? the html was something like this ul liTest Test Test /li liTest Test Test /li li class=lastTest Test Test /li /ul so li.last and li:last equal the same thing Thanks for all the info so far --- Alexandru Dinulescu Web Developer (X)HTML/CSS Specialist Expert Guarantee Certified Developer XHTML: http://www.expertrating.com/transcript.asp?transcriptid=1879053 CSS : http://www.expertrating.com/transcript.asp?transcriptid=1870619 RentACoder Profile: http://www.rentacoder.com/RentACoder/DotNet/SoftwareCoders/ShowBioInfo.aspx?lngAuthorId=6995323 MainWebsite: http://alexd.adore.ro Portofolio: http://alexd.adore.ro/project_page.php On Thu, Feb 12, 2009 at 6:38 PM, MorningZ morni...@gmail.com mailto:morni...@gmail.com wrote: So all the parantheses are where they belong.. you should not use () in the document.ready line $(document).ready(blabla()) won't work $(document).ready(blabla) will work On Feb 12, 11:32 am, Alexandru Dinulescu alex.d.a...@gmail.com mailto:alex.d.a...@gmail.com wrote: Also i didnt say this I said function blabla() { } $(document).ready(blabla()) ? So all the parantheses are where they belong... --- Alexandru Dinulescu Web Developer (X)HTML/CSS Specialist Expert Guarantee Certified Developer XHTML:http://www.expertrating.com/transcript.asp?transcriptid=1879053 CSS :http://www.expertrating.com/transcript.asp?transcriptid=1870619 RentACoder Profile:http://www.rentacoder.com/RentACoder/DotNet/SoftwareCoders/ShowBioInf... MainWebsite:http://alexd.adore.ro Portofolio:http://alexd.adore.ro/project_page.php On Thu, Feb 12, 2009 at 5:40 PM, MorningZ morni...@gmail.com mailto:morni...@gmail.com wrote: For the first part of your post li:last gets the last li in the given ul li.last gets any li with the class of last For the second part of your post, your syntax is wrong $(document).ready(blabla) (note the lack of () after the function name) On Feb 12, 8:59 am, Alexandru Dinulescu alex.d.a...@gmail.com mailto:alex.d.a...@gmail.com wrote: Why does this : $(document).ready(function(){ if($(.leftNav ul li:last).height() 32){ $(.leftNav ul li.last).addClass(lastWithItems); } }) work in 1.3.1 but not this $(document).ready(function(){ if($(.leftNav ul li.last).height() 32){ $(.leftNav ul li.last).addClass(lastWithItems); } }) (Notice the li.last on both lines) ??? Also why isnt it explained anywhere :( Another thing why cant i do this function blabla() { } $(document).ready(blabla()) ? and i have to do $(document).ready(function(){}) From what i recall i could do both things in 1.2.6, now with 1.3.1 those seem to be impossible, also why isnt there any mention on the Jquery doc/tutorial pages? :( Thanks --- Alexandru Dinulescu Web Developer (X)HTML/CSS Specialist Expert Guarantee Certified Developer XHTML:http://www.expertrating.com/transcript.asp?transcriptid=1879053 CSS :http://www.expertrating.com/transcript.asp?transcriptid=1870619 RentACoder Profile: http://www.rentacoder.com/RentACoder/DotNet/SoftwareCoders/ShowBioInf... MainWebsite:http://alexd.adore.ro Portofolio:http://alexd.adore.ro/project_page.php
[jQuery] [validate] url checking doesn't allow localhost
The validation rule for URLs seems not to like single-part domain names. For instance: http://localhost/whatever.htm will fail...
[jQuery] Re: uncheck specific checkbox
Well thanks for that, I didn't know and it seems to work perfectly But why is it then when I do something like an alert($(mycheckbox).attr ('checked')); on an unckecked checkbox it returns false? On Feb 12, 5:46 pm, mkmanning michaell...@gmail.com wrote: In HTML checked is a boolean (of sorts), its presence is sufficient, you don't need to set it to anything; if you want something unchecked you should remove the 'checked' attribute. In XHTML, attribute minimization is forbidden (i.e. attributes can't be empty), so the proper syntax is checked=checked (for disabled it's disabled=disabled, etc.) Use removeAttr() instead of setting the value to false. On Feb 12, 8:26 am, Frederik Ring frederik.r...@gmail.com wrote: Hi! The thing is that somwhow (don't ask me why) the unchecked attribute of a checkbox is '' instead of 'false'. This worked fine with me: HTML: input class=parentcheckbox type=checkbox checked=true name=cb01/input input class=childcheckbox type=checkbox checked=true name=cb02/input input class=childcheckbox type=checkbox checked=true name=cb03/input input class=childcheckbox type=checkbox checked=true name=cb04/input jQuery: $(document).ready(function(){ $('.childcheckbox').change(function(){ $(this).prev('.parentcheckbox').attr('checked',''); }); }); On Feb 12, 4:57 pm, Andy adharb...@gmail.com wrote: Hey guys, I'm trying to uncheck a checkbox that is inside my flexigrid. I have a checkbox in the header and the column has all checkboxes. What I'm trying to do is if I select the top checkbox (so all of the checkboxes below are selected), I would like to uncheck that checkbox if any of the other checkboxes in that column are unchecked. I'm using the following code, but when it runs through this, it unselects all of the items, instead of just the header. Code snippet: var rItem = document.getElementById(chk_col_ + colName); $(inp...@name= + rItem.name + ][type='checkbox']).attr('checked', false); The checkbox is named correctly, so I'm not sure why this isn't working. Thanks!
[jQuery] Re: how to fade in image after the site loads?
Thanks a lot for the help, unfortunately it didnt take. One more thing, how could I go about getting the $('.site').fadeIn(); to execute after the other two have finished? I wish I could offer some suggestions to help spark an idea on your end, but I am drawing a complete blank...Which is why I am on here asking for help. So thank you very much for any other ideas you may have. On Feb 12, 3:54 am, Paul Mills paul.f.mi...@gmail.com wrote: Hi, Try something like this: $('#photo img').load(function() { $('.pic').fadeIn(); $('div.position').fadeOut(); $('.site').fadeIn(); }); The .load() event should fire when the images has loaded. You don't need to remove the classes pic and site to get the fades in/out to work. Paul On Feb 11, 11:17 pm,surreal5335surrea...@hotmail.com wrote: I am working making an intro page to a photo site and I need the image to fade in slowly after the site finishes loading. I believe I have the jquery correct but something is obviously wrong. Right the now the image is hidden, but it wont fadeIn. I am also trying to get the text Please wait for site to load to slowly fadeOut during this, then after all thats done, fadeIn the Enter Site text. Here is the code I am using for it. So far only a few things are working properly. script type=text/javascript src=http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/ jquery.min.js/script script type=text/javascript $(document).ready(function(){ $(span).ready(function(){ $(this).removeClass(pic){ $(this).fadeIn(4000); } }, function() { $(div).fadeOut(6000); }, function() { $(a#site).removeClass(site); $(this).fadeIn(1000); }); }); /script style type=text/css a.site {display: none} span.pic {display: none} table.position {position: center} div.position {text-align: center} /style /head body table border=1 class=position tr td span id=photo class=pic img src=/test/land_scape_5.png /span /td /tr tr td div class=positionPlease wait for site to load/div a href=# class=site id=site style=text-align: rightEnter Site/a /td /tr /table Here is the link to the page to see whats it giving me: http://royalvillicus.com/test/photo.html I appreciate all the help
[jQuery] Re: Getting data from the corresponding column. (HTML Table with thead and tbody section.)
To make this example more readable, and to better convey my goal, I've restructured the CSS and HTML. Only the green area is click able (as it should be, the red area does not have a bound click even for a reason). When I click any part of the green area, I would like to get the value from the table head from the blue area in the corresponding column. !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en head titleExample Table/title style table, thead, tbody, tfoot, tr, th, td { border-collapse: collapse; border: 1px SOLID; padding: 10px 10px 10px 10px; font: 12px Arial; } thead th {background: #FAA;} thead td {background: #AAF;} tbody th {background: #FCC;} tbody td {background: #CFC;} tbody tr.odd th {background: #FAA;} tbody tr.odd td {background: #AFA;} /style script src=http://jqueryjs.googlecode.com/files/jquery-1.3.1.min.js; type=text/javascript/script script type=text/javascript $(document).ready(function() { $(tbody td).click(function(e) { var innerHTML = $(this).get(0).innerHTML; alert(innerHTML); }); $(tbody tr:odd).addClass('odd'); }); /script /head body table thead trthtHead-1A/thtdtHead-1B/tdtdtHead-1C/tdtdtHead-1D/td/tr /thead tbody trthtBody-1A/thtdtBody-1B/tdtdtBody-1C/tdtdtBody-1D/td/tr trthtBody-2A/thtdtBody-2B/tdtdtBody-2C/tdtdtBody-2D/td/tr trthtBody-3A/thtdtBody-3B/tdtdtBody-3C/tdtdtBody-3D/td/tr trthtBody-4A/thtdtBody-4B/tdtdtBody-4C/tdtdtBody-4D/td/tr /tbody /table /body /html Title: Example Table tHead-1AtHead-1BtHead-1CtHead-1D tBody-1AtBody-1BtBody-1CtBody-1D tBody-2AtBody-2BtBody-2CtBody-2D tBody-3AtBody-3BtBody-3CtBody-3D tBody-4AtBody-4BtBody-4CtBody-4D
[jQuery] Re: [validate] url checking doesn't allow localhost
Right. Take a look at the bundled additionalMethods.js, it conains url2 to is more accurate in terms of the specification, and accepts localhost etc. Jörn On Thu, Feb 12, 2009 at 6:16 PM, Seb Duggan seb.dug...@gmail.com wrote: The validation rule for URLs seems not to like single-part domain names. For instance: http://localhost/whatever.htm will fail...
[jQuery] Re: New to JQuery, silly question.
I guess it's something else in your code that is going wrong. I just copied and pasted your JS and HTML and it works fine: http://jsbin.com/ibete http://jsbin.com/ibete/edit Can you post a test page like the one your working, showing this issue? Then I'm sure someone will spot the problem. cheers, - ricardo On Feb 12, 3:12 pm, Alexandru Dinulescu alex.d.a...@gmail.com wrote: Any info why the li:last and li.last do not work? the html was something like this ul liTest Test Test /li liTest Test Test /li li class=lastTest Test Test /li /ul so li.last and li:last equal the same thing Thanks for all the info so far --- Alexandru Dinulescu Web Developer (X)HTML/CSS Specialist Expert Guarantee Certified Developer XHTML:http://www.expertrating.com/transcript.asp?transcriptid=1879053 CSS :http://www.expertrating.com/transcript.asp?transcriptid=1870619 RentACoder Profile:http://www.rentacoder.com/RentACoder/DotNet/SoftwareCoders/ShowBioInf... MainWebsite:http://alexd.adore.ro Portofolio:http://alexd.adore.ro/project_page.php On Thu, Feb 12, 2009 at 6:38 PM, MorningZ morni...@gmail.com wrote: So all the parantheses are where they belong.. you should not use () in the document.ready line $(document).ready(blabla()) won't work $(document).ready(blabla) will work On Feb 12, 11:32 am, Alexandru Dinulescu alex.d.a...@gmail.com wrote: Also i didnt say this I said function blabla() { } $(document).ready(blabla()) ? So all the parantheses are where they belong... --- Alexandru Dinulescu Web Developer (X)HTML/CSS Specialist Expert Guarantee Certified Developer XHTML:http://www.expertrating.com/transcript.asp?transcriptid=1879053 CSS :http://www.expertrating.com/transcript.asp?transcriptid=1870619 RentACoder Profile: http://www.rentacoder.com/RentACoder/DotNet/SoftwareCoders/ShowBioInf... MainWebsite:http://alexd.adore.ro Portofolio:http://alexd.adore.ro/project_page.php On Thu, Feb 12, 2009 at 5:40 PM, MorningZ morni...@gmail.com wrote: For the first part of your post li:last gets the last li in the given ul li.last gets any li with the class of last For the second part of your post, your syntax is wrong $(document).ready(blabla) (note the lack of () after the function name) On Feb 12, 8:59 am, Alexandru Dinulescu alex.d.a...@gmail.com wrote: Why does this : $(document).ready(function(){ if($(.leftNav ul li:last).height() 32){ $(.leftNav ul li.last).addClass(lastWithItems); } }) work in 1.3.1 but not this $(document).ready(function(){ if($(.leftNav ul li.last).height() 32){ $(.leftNav ul li.last).addClass(lastWithItems); } }) (Notice the li.last on both lines) ??? Also why isnt it explained anywhere :( Another thing why cant i do this function blabla() { } $(document).ready(blabla()) ? and i have to do $(document).ready(function(){}) From what i recall i could do both things in 1.2.6, now with 1.3.1 those seem to be impossible, also why isnt there any mention on the Jquery doc/tutorial pages? :( Thanks --- Alexandru Dinulescu Web Developer (X)HTML/CSS Specialist Expert Guarantee Certified Developer XHTML: http://www.expertrating.com/transcript.asp?transcriptid=1879053 CSS :http://www.expertrating.com/transcript.asp?transcriptid=1870619 RentACoder Profile: http://www.rentacoder.com/RentACoder/DotNet/SoftwareCoders/ShowBioInf. .. MainWebsite:http://alexd.adore.ro Portofolio:http://alexd.adore.ro/project_page.php
[jQuery] Re: uncheck specific checkbox
Unfortunately all is not simple in browser-land. You can use checked with no values, or checked=checked or checked=true|false and get what you want/expect given a particular doctype. Even coding to XHTML standards doesn't mean the browser will follow the standards, since most XHTML is rendered as HTML(ish). Browsers are notoriously forgiving, to the detriment of everyone :( Your best bet is to try and follow specs in the hope that you're building in forwards-compatibility as user-agents become more standards compliant. On Feb 12, 9:27 am, Frederik Ring frederik.r...@gmail.com wrote: Well thanks for that, I didn't know and it seems to work perfectly But why is it then when I do something like an alert($(mycheckbox).attr ('checked')); on an unckecked checkbox it returns false? On Feb 12, 5:46 pm, mkmanning michaell...@gmail.com wrote: In HTML checked is a boolean (of sorts), its presence is sufficient, you don't need to set it to anything; if you want something unchecked you should remove the 'checked' attribute. In XHTML, attribute minimization is forbidden (i.e. attributes can't be empty), so the proper syntax is checked=checked (for disabled it's disabled=disabled, etc.) Use removeAttr() instead of setting the value to false. On Feb 12, 8:26 am, Frederik Ring frederik.r...@gmail.com wrote: Hi! The thing is that somwhow (don't ask me why) the unchecked attribute of a checkbox is '' instead of 'false'. This worked fine with me: HTML: input class=parentcheckbox type=checkbox checked=true name=cb01/input input class=childcheckbox type=checkbox checked=true name=cb02/input input class=childcheckbox type=checkbox checked=true name=cb03/input input class=childcheckbox type=checkbox checked=true name=cb04/input jQuery: $(document).ready(function(){ $('.childcheckbox').change(function(){ $(this).prev('.parentcheckbox').attr('checked',''); }); }); On Feb 12, 4:57 pm, Andy adharb...@gmail.com wrote: Hey guys, I'm trying to uncheck a checkbox that is inside my flexigrid. I have a checkbox in the header and the column has all checkboxes. What I'm trying to do is if I select the top checkbox (so all of the checkboxes below are selected), I would like to uncheck that checkbox if any of the other checkboxes in that column are unchecked. I'm using the following code, but when it runs through this, it unselects all of the items, instead of just the header. Code snippet: var rItem = document.getElementById(chk_col_ + colName); $(inp...@name= + rItem.name + ][type='checkbox']).attr('checked', false); The checkbox is named correctly, so I'm not sure why this isn't working. Thanks!
[jQuery] Re: Is there a way to make a textarea that auto expands as needed?
If Ricardo's solution doesn't work for you, you could try Brandon Aaron's plugin. http://github.com/brandonaaron/jquery-expandable/tree/master --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Feb 12, 2009, at 8:14 AM, Ricardo Tomasi wrote: Did you skip my previous message? On Feb 12, 11:02 am, Rick Faircloth r...@whitestonemedia.com wrote: Ideas, anyone? -Original Message- From: jquery-en@googlegroups.com [mailto:jquery- e...@googlegroups.com] On Behalf Of Rick Faircloth Sent: Wednesday, February 11, 2009 6:56 PM To: jquery-en@googlegroups.com Subject: [jQuery] Is there a way to make a textarea that auto expands as needed? I'd like to figure out a way to make a textarea that expands with text input when necessary and shrinks, also, if possible...and without scrollbars. I've looked around, but haven't found a solution that does everything. Anyone know if that's possible with jQuery? Or how to do it? Rick
[jQuery] Re: how to fade in image after the site loads?
Hi again, Sorry that didn't work. It might be interacting with something else in your HTML or JS. You can chain effects together by using a callback function so to chain all three you would do this: $(document).ready(function(){ $('#photo img').load(function() { $('.pic').fadeIn(4000, function(){ $('div.position').fadeOut(6000, function(){ $('.site').fadeIn(1000); }); }); }); }); I've just popped this code into a demo on jsbin and seems to be working fine. http://jsbin.com/obezi (nb - also just spotted that '' is missing from end of the img tag in your code above!) Paul
[jQuery] Re: [validate] url checking doesn't allow localhost
Thanks Jörn - sorry, didn't see them... On Feb 12, 5:47 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Right. Take a look at the bundled additionalMethods.js, it conains url2 to is more accurate in terms of the specification, and accepts localhost etc. Jörn On Thu, Feb 12, 2009 at 6:16 PM, Seb Duggan seb.dug...@gmail.com wrote: The validation rule for URLs seems not to like single-part domain names. For instance: http://localhost/whatever.htm will fail...
[jQuery] Re: Jquery slideDown confusion
I don't know if it'll fix your issue, but you cannot have two elements on the same page with the same ID. (In this case, two id=menu) On Feb 12, 7:37 am, surreal5335 surrea...@hotmail.com wrote: I have made this slide Down function for my navigation menu with some help. Firefox no longer spits out errors but the code is acting weird. It seems that main menu is used to select which sub menu to show (correct), but the hover action doesnt take place till I hover over an image map that has nothing to do with the navigation menu. I have tried several changes to the name and ID attributes in hopes that was the problem, but still same problem persitsts. Here is the jquery code: var currentSpan = 1; function showMe() { $(span).hover(function() { $(#ex_+currentSpan).slideDown(500); }, function() { $(#ex_+n).slideUp(500); }); currentSpan = n; } Here is the image map code (which works fine by itself): span class=menu id=menu map name=menu id=menu area alt=memberships shape=rect coords=134, 143, 176, 166 href=#/ area alt=memberships shape=rect coords=188, 143, 231, 166 href=#/ area alt=memberships shape=rect coords=243, 143, 285, 166 href=#/ area alt=memberships shape=rect coords=297, 143, 340, 166 href=#/ area alt=memberships shape=rect coords=351, 143, 394, 166 href=#/ /map img src=image/fsummary.png alt=membership comparison usemap=#menu width= height= vspace=5 hspace=1/brbr /span link:http://royalvillicus.com/reforeclosure.php Thanks a lot for your help
[jQuery] Re: [validate] url checking doesn't allow localhost
No problem, they aren't discoverable anyway. You're the first to ask for them since we added them. Jörn On Thu, Feb 12, 2009 at 7:26 PM, Seb Duggan seb.dug...@gmail.com wrote: Thanks Jörn - sorry, didn't see them... On Feb 12, 5:47 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Right. Take a look at the bundled additionalMethods.js, it conains url2 to is more accurate in terms of the specification, and accepts localhost etc. Jörn On Thu, Feb 12, 2009 at 6:16 PM, Seb Duggan seb.dug...@gmail.com wrote: The validation rule for URLs seems not to like single-part domain names. For instance: http://localhost/whatever.htm will fail...
[jQuery] Re: Upgraded from 1.2.1 to 1.3.1 and jquery.flash has stopped working.
Not sure about the plugin, but the problem is with the @ character in the selector. The expression should be [type='file'] and not [...@type='file'] On Feb 12, 7:35 am, Dan dan.ashd...@gmail.com wrote: Hello! I have just upgraded from jQuery 1.2.1 to 1.3.1 however this has broken the jQuery.flash plugin. (I'm also using jquploader in the page but I think it's jquery.flash that's causing the problem. I'm getting this error in fireBug [Exception... 'Syntax error, unrecognized expression: [...@type='file']' when calling method: [nsIDOMEventListener::handleEvent] nsresult: 0x8057001e (NS_ERROR_XPC_JS_THREW_STRING) location: unknown data: no] Has anyone else had this issue or know how I can resolve this? Thanks
[jQuery] Re: gettng value from radio buttons
function updateoptns() { var val = $(input[name='optns']:checked); alert(val); } On Feb 12, 5:22 am, Frederik Ring frederik.r...@gmail.com wrote: Hi! You could do it like this: $(document).ready(function(){ $('input:radio[name=\'optns\']').click(function() { var optns = $(this).val(); alert (optns); }); }); You'll have to remove your onclick-s then. On Feb 12, 3:22 pm, angelochen...@gmail.com angelochen...@gmail.com wrote: Hi, I have two radio buttons, when user click I'd like to know what is value selected now inside updateoptns, but the code below always return '0', any idea how to do this? Thanks, Angelo label for=optns /label input checked=checked class=rb_optns id=rd1 name=optns onClick=updateoptns() type=radio value=0 / /label input id=rd2 name=optns onClick=updateoptns() type=radio value=1 / Metric (kg/cm)/label br clear=none / function updateoptns() { var optns = jQuery(inp...@name='optns']); alert(optns.val()); }
[jQuery] Re: ClueTip Tooltips only appear on PageLoad, but not after partial page postback in ASP.Net web application
You'll need to rebind cluetip after partial page updates. I prefer to use the livquery plugin to do this, as it keeps the event bindings through dom updates, or in your case updatepanel partial page loads. With livequery you could do the following $(document).ready(function() { $(.nicetooltip).livequery(function() { $(this).cluetip(); }); }); If you don't want to use another plugin you can also rebind the cluetip or any other events using the MS ajax way, with Sys.Application.add_load as following $(document).ready(bind_events); Sys.Application.add_load(bind_events); function bind_events() { $('.nicetooltip').cluetip ({ attribute: 'rel', splitTitle: '|', cluetipClass: 'jtip', dropShadowSteps: 2, ajaxCache: true }); } Andrew On Feb 12, 6:09 am, aaran76 aa...@clusterone.org wrote: Apologies if this post appears twice, but I posted it at approx 9am GMT, but it never appeared. When using ClueTip within and Ajax UpdatePanel, the tooltip appears on initial page load. Then clicking on an 'edit button' hides one panel and displays another. Upon returning to the initial page view (clicking 'Cancel' or 'Save' performs a second partial page update and returns to the initial grid view), the tooltip no longer displays. Is this a limitation of the clueTip plugin, or do I need to do something particular to resolve this issue? The script is initialised as: script type=text/javascript language=javascript $(document).ready(function() { $('.nicetooltip').cluetip ({ attribute: 'rel', splitTitle: '|', cluetipClass: 'jtip', dropShadowSteps: 2, ajaxCache: true }); }); /script
[jQuery] Re: jquery / ajax
The data part of ajax should be some pair, for example: data: {myVar:value} myVar will then become your POST variable with the value 'value' (not the literal string) in your PHP script. To extend on the comment using Firebug, you should use it for Firefox. The Firebug console will show you requests that are done through AJAX including parameters that are GET/POSTed and the response it returns. Very useful for debugging. On Feb 12, 5:16 am, Liam Potter radioactiv...@gmail.com wrote: you can test if it would work using firebug, just check the net tab for activity from the page to some.php weidc wrote: Hi, i got a radio button. if this radio button is checked it shell send the value of the button to a .php document. didn't used ajax at all so i don't know how to do this. at the moment i tried something like this: $(:radio).click(function() { $(#infoding).css(display,block); var value = $(this).val(); $.ajax({ type: POST, url: some.php, data: value, success: function(msg){ alert( Data Saved: + value ); } }); }); got it out of some documentation but don't know if it would work 'cause i'm not able to test it at the moment. i'd like to know if this would work and if not how it could work. i'd be happy about any help. thanks -weidc
[jQuery] Re: Safe Ajax Calls?
Thanks, the idea would be like this: $(document).ready(function(){ $('a.aj_link').click(function(){ var link=$(this).attr(href); link = link.split('?'); var url = link[0]; var sendVars = link[1]; var layer = $(this).attr(name); $.ajax({ type: POST, url: ajax/+url+.asp?nocache=+Math.random(), data: sendVars, success: function(msg){ $('#'+layer).html(msg); }, dataType: 'HTML' }); return false; }); }); This script is in a .js file I took the href attribute as de main query string, then de first part of the string is the url and the rest is the dataString And the name attribute represents the id of the element to inject with HTML But here is another question, what if I need to get a json data type? Ok, maybe i should do another onClick event for other class of link but, how can I read this data in a function after the success event, any ideas? Greetings! On 11 feb, 15:58, Ricardo Tomasi ricardob...@gmail.com wrote: *and don't forget to return false or do e.preventDefault() $('.aj-link').click(function(){ var page = $(this).attr('href'); $('#targetDIV').load('ajax/'+page+'nocache='+Math.random()); return false; }); On Feb 11, 4:57 pm, Ricardo Tomasi ricardob...@gmail.com wrote: $('.aj-link').click(function(){ var page = $(this).attr('href'); $('#targetDIV').load('ajax/'+page+'nocache='+Math.random()); }); http://docs.jquery.com/Selectorshttp://docs.jquery.com/Eventshttp://d... On Feb 11, 10:40 am, SoulRush saavedra@gmail.com wrote: I though that it would be nice to make the links with a certain format like: a href=ajaxProcess.php?var1=var1valuevar2=var2value class=aj- link link/a And make a selection for that kind of links with jquery, that takes these data to make an ajax call with post... That selection should be in a .js outside of the source of the pages and packed or something... What do you think? Please I need some feedback :) Greetings! On 9 feb, 17:02, SoulRush saavedra@gmail.com wrote: By the way, the first parameter takes the vars to send... so in the pages I've to dynamically set varname1=value1varname2=value2 On 9 feb, 10:40, SoulRush saavedra@gmail.com wrote: Hi! I'm kind of new at the world of ajax and jquery and i'm starting to make a site with them. In my site i've created a single function (in the header) called ajaxQry(...) which takes some parameters like, url to make post or get, if I need GEt or POST, the data type of the query, a success function and an error function. Anyway, it look like this: function ajaxQry(sendVars, url, returnType, backFunction, errorFunction){ $.ajax({ type: POST, url: ajax/+url+.asp?nocache=+Math.random(), data: sendVars, success: backFunction, //ussully this loads the content in the main page as html dataType: returnType, error: errorFunction }); } Everything works great but i don't know if there's a better way to do this, because in many events of the site I call this function... And I'm starting to think that it's pretty insecure What do you think? By the way i ussually call the url file (see the function) and return HTML content, and then i load it in the page with $(selector).html(); is that okay? Thanks! and sorry for my english :$
[jQuery] Re: New to JQuery, silly question.
Here is the Link of the page in question. THIS WORKS: http://alexd.adore.ro/projects/threadsmith/getIdeas.html $(document).ready(function(){ if($(.leftNav ul li:last).height() 32){ $(.leftNav ul li.last).addClass(lastWithItems); } }) THIS DOESNT; http://alexd.adore.ro/projects/threadsmith/getIdeas2.html $(document).ready(function(){ if($(.leftNav ul li:last).height() 32){ $(.leftNav ul li:last).addClass(lastWithItems); } }) THIS DOESNT ALSO http://alexd.adore.ro/projects/threadsmith/getIdeas3.html $(document).ready(function(){ if($(.leftNav ul li.last).height() 32){ $(.leftNav ul li:last).addClass(lastWithItems); } }) --- Alexandru Dinulescu Web Developer (X)HTML/CSS Specialist Expert Guarantee Certified Developer XHTML: http://www.expertrating.com/transcript.asp?transcriptid=1879053 CSS : http://www.expertrating.com/transcript.asp?transcriptid=1870619 RentACoder Profile: http://www.rentacoder.com/RentACoder/DotNet/SoftwareCoders/ShowBioInfo.aspx?lngAuthorId=6995323 MainWebsite: http://alexd.adore.ro Portofolio: http://alexd.adore.ro/project_page.php On Thu, Feb 12, 2009 at 7:15 PM, Liam Potter radioactiv...@gmail.comwrote: Hi Alexandru, I cannot see any reason why li.last would not work, as it would be no different then selecting any li with any class. Alexandru Dinulescu wrote: So this should work right? function blabla() { } $(document).ready(blabla); --- Any info why the li:last and li.last do not work? the html was something like this ul liTest Test Test /li liTest Test Test /li li class=lastTest Test Test /li /ul so li.last and li:last equal the same thing Thanks for all the info so far --- Alexandru Dinulescu Web Developer (X)HTML/CSS Specialist Expert Guarantee Certified Developer XHTML: http://www.expertrating.com/transcript.asp?transcriptid=1879053 CSS : http://www.expertrating.com/transcript.asp?transcriptid=1870619 RentACoder Profile: http://www.rentacoder.com/RentACoder/DotNet/SoftwareCoders/ShowBioInfo.aspx?lngAuthorId=6995323 MainWebsite: http://alexd.adore.ro Portofolio: http://alexd.adore.ro/project_page.php On Thu, Feb 12, 2009 at 6:38 PM, MorningZ morni...@gmail.com mailto: morni...@gmail.com wrote: So all the parantheses are where they belong.. you should not use () in the document.ready line $(document).ready(blabla()) won't work $(document).ready(blabla) will work On Feb 12, 11:32 am, Alexandru Dinulescu alex.d.a...@gmail.com mailto:alex.d.a...@gmail.com wrote: Also i didnt say this I said function blabla() { } $(document).ready(blabla()) ? So all the parantheses are where they belong... --- Alexandru Dinulescu Web Developer (X)HTML/CSS Specialist Expert Guarantee Certified Developer XHTML:http://www.expertrating.com/transcript.asp?transcriptid=1879053 CSS :http://www.expertrating.com/transcript.asp?transcriptid=1870619 RentACoder Profile: http://www.rentacoder.com/RentACoder/DotNet/SoftwareCoders/ShowBioInf... MainWebsite:http://alexd.adore.ro Portofolio:http://alexd.adore.ro/project_page.php On Thu, Feb 12, 2009 at 5:40 PM, MorningZ morni...@gmail.com mailto:morni...@gmail.com wrote: For the first part of your post li:last gets the last li in the given ul li.last gets any li with the class of last For the second part of your post, your syntax is wrong $(document).ready(blabla) (note the lack of () after the function name) On Feb 12, 8:59 am, Alexandru Dinulescu alex.d.a...@gmail.com mailto:alex.d.a...@gmail.com wrote: Why does this : $(document).ready(function(){ if($(.leftNav ul li:last).height() 32){ $(.leftNav ul li.last).addClass(lastWithItems); } }) work in 1.3.1 but not this $(document).ready(function(){ if($(.leftNav ul li.last).height() 32){ $(.leftNav ul li.last).addClass(lastWithItems); } }) (Notice the li.last on both lines) ??? Also why isnt it explained anywhere :( Another thing why cant i do this function blabla() { } $(document).ready(blabla()) ? and i have to do $(document).ready(function(){}) From what i recall i could do both things in 1.2.6, now with 1.3.1 those seem to be impossible, also why isnt there any mention on the Jquery doc/tutorial pages? :( Thanks --- Alexandru Dinulescu Web Developer (X)HTML/CSS Specialist Expert Guarantee Certified Developer
[jQuery] How to make a secured login form
How to secure this jquery+php+ajax login procedure ? $('#myform').submit( function() { $(this).ajaxSubmit( { type:'POST', url:'login.php', success: function(msg) { login ok : how to call the welcome.php *** }, error: function(request,iderror) { alert(iderror + + request); } }); return false; }) form id=myForm action= Name : input type='text' name='login' size='15' / divPassword : input type='password' name='passe' size='15' / /div input type=submit value=login class=submit / /form Login.php check the parameters and reply by echo ok or echo ko Logically if the answer is ok we must call a welcome.php module BUT, if someone read the client code, he will see the name of the module and can hack the server. May I wrong ? how to secure this code ?
[jQuery] Re: How to make a secured login form
Well... if your module properly checks that the user is logged in then there shouldn't really be a problem, provided you're making sessions properly and not easy to crack. Other than that, if all the checking is done server-side, then your login method is really no different whether you're doing it with AJAX or without. You're still going through HTTP and sending the same data across. You can make it more secure to data-sniffing if you use SSL, but that's a different story. On Feb 12, 8:53 am, phicarre gam...@bluewin.ch wrote: How to secure this jquery+php+ajax login procedure ? $('#myform').submit( function() { $(this).ajaxSubmit( { type:'POST', url:'login.php', success: function(msg) { login ok : how to call the welcome.php *** }, error: function(request,iderror) { alert(iderror + + request); } }); return false; }) form id=myForm action= Name : input type='text' name='login' size='15' / divPassword : input type='password' name='passe' size='15' //div input type=submit value=login class=submit / /form Login.php check the parameters and reply by echo ok or echo ko Logically if the answer is ok we must call a welcome.php module BUT, if someone read the client code, he will see the name of the module and can hack the server. May I wrong ? how to secure this code ?
[jQuery] Get contents of first child tr, td with class
I have a table like so: table id=recent_activity thead tr tht1/th tht2/th /tr /thead tbody tr tdvalue/td td class=date2008-09-01/td --- want this content /tr tr tdvalue/td td class=date2008-09-01/td /tr /tbody /table And I want to try and get the first td with class date, I've tried the following and I get close, but I think I'm just missing something easy: $('#recent_activity tbody:first-child .activity_date').val(); -- returns undefined or $('#recent_activity tbody:first-child .activity_date').html(); -- returns null Thoughts? Better way? Thanks
[jQuery] Re: Get contents of first child tr, td with class
$(#recent_activity tbody tr td.date:first).text(); On Feb 12, 9:13 am, Mark Steudel msteu...@gmail.com wrote: I have a table like so: table id=recent_activity thead tr tht1/th tht2/th /tr /thead tbody tr tdvalue/td td class=date2008-09-01/td --- want this content /tr tr tdvalue/td td class=date2008-09-01/td /tr /tbody /table And I want to try and get the first td with class date, I've tried the following and I get close, but I think I'm just missing something easy: $('#recent_activity tbody:first-child .activity_date').val(); -- returns undefined or $('#recent_activity tbody:first-child .activity_date').html(); -- returns null Thoughts? Better way? Thanks
[jQuery] Re: Get contents of first child tr, td with class
Thanks, though that didn't work for me, though it could be more my page doesn't match my example totally. Though I did just come up with this, and this seems to work: $('.activity_date:first').html() ; On Feb 12, 11:21 am, James james.gp@gmail.com wrote: $(#recent_activity tbody tr td.date:first).text(); On Feb 12, 9:13 am, Mark Steudel msteu...@gmail.com wrote: I have a table like so: table id=recent_activity thead tr tht1/th tht2/th /tr /thead tbody tr tdvalue/td td class=date2008-09-01/td --- want this content /tr tr tdvalue/td td class=date2008-09-01/td /tr /tbody /table And I want to try and get the first td with class date, I've tried the following and I get close, but I think I'm just missing something easy: $('#recent_activity tbody:first-child .activity_date').val(); -- returns undefined or $('#recent_activity tbody:first-child .activity_date').html(); -- returns null Thoughts? Better way? Thanks
[jQuery] onClick event on content loaded by ajax
Hi there, I couldn't find any solutions for my problem, so I'm asking here. I have a form that was previously loaded by ajax and which I want to submit also with ajax. unfortunately, the jQuery(document).ready function has been executet before the form was loaded, and so the event handler onClick for the submit link isn't called when I click on the button in the form. So, jQuery(#submit-register-form).click(function() { alert('yay'); } doesn't work if the form has been loaded by ajax, but does work if I load it on site load. How can I solve this? Regards, Oli