[jQuery] still confused, but a little more organised
About a week ago, I volunteered to blog my efforts at learning jQuery - I seem to be finding it more troublesome than most beginners! Some of you were encouraging (thank you VERY much!) but you all said it made a confusing read. Well, to an extent I can't fix that because the author *is* confused! However, I've done a whole new page for it, with nested topics & all. I hope it's easier to follow?? http://jquery.cherryaustin.com There is a comments box and I'll add proper contact facilities if anybody reads it ;) Cheers, and thanks as ever for all your help :) Cherry.
[jQuery] ui tabs, more different tab styles
How to implement different tab styles (css) on one page with UI Tabs?
[jQuery] document.getSelection() and FireFox 2.0.0.11
Hi, The following code doesn't work with FireFox. It works fine with MSIE 7. This message was generated from error consol: Deprecated method document.getSelection() called. Please use window.getSelection() instead. The code : function chkAva(lnk,id){ el = document.getElementById(id).value; if (el == ''){ alert('The user id should have a value before check'); return; } av = "Available"; na = "Not Available, choose another one!" $(document).ready(function(){ $("#"+lnk).before(" "); $.ajax({url: 'chk_user.php',type:'GET', data: 'Id='+ el, cache: false, dataType: "script", success: function(data, textStatus){ $("#waitImg").remove() if (data == 0){ if (document.getElementById('av') == null){ $("#"+lnk).after(" "+av+""); } else{ $("#av").empty(); $("#"+lnk).after(" "+av+""); } } else{ if (document.getElementById('av') != null){ $("#av").empty(); } $("#"+lnk).after(" "+na+""); } }, error: function(x,txt,err){ $("#waitImg").remove(); alert('Could not check...'+"\n"+'The server may down or busy. Retry again after a while.'); } }); });
[jQuery] Re: Is it possible to send javascript vars TO a jquery function??
On Feb 9, 11:43 am, cbmtrx <[EMAIL PROTECTED]> wrote: > Thanks lihao. > > Actually, there are cases when there would be more than one "newdiv" > following an "olddiv"...which means that the jquery .next identifier > wouldn't always work. ie: It's not a 1:1 ratio. So I've been trying to > find the most simple&elegant solution, without resorting to the old > javascript functions... You probably can use a container DIV to each group of and new/old DIVs, then you can handle variable number of inside DIVs with jQuery more easily. > From what little I've learned so far, jquery seems to work mostly in > one direction (JQ -> DOM) and it doesn't seem all that geared up for > doing things the other way around (unless you use a plugin like > metadata for passing vars, which isn't any simpler). I think, we don't have to isolate jQuery from original Javascript, we can still customize javascript functions and just use jQuery's great feature of parsing DOM. From my understanding, as long as your data is in DOM, you can always use jQuery to find them. so for the above metadata example, we can use the tricks mentioned in Smith's post(for simple cases, we don't really need a plugin), for example, we can use 'class' to deliever parameters and then use 'eval' and jQuery's feature to extract these data: click1 | click2 | click3 va : vb : var $DIV = $('div#test'); $('a', $DIV).click(function() { var metadata; eval( "metadata = " + $(this).attr('class') ); $('span:eq(0)', $DIV).html(metadata.va); $('span:eq(1)', $DIV).html(metadata.vb); }); We don't have to use the 'class' attribute though, we can use 'title' or else for this trick :-) Regards, lihao(XC)
[jQuery] jquery tablesorter 2.0.1 with tr in thead
I have a complex table header that contains multiple elements in the . An example is at http://donpoo.net/jquery/. The table renders okay but sorting doesn't work correctly. Clicking on the "Latency (ms)" column in the "Totals" group results in the column "Ops/ s" in the "Read" group to get sorted. I think this is due to using col spans with multiple elements in the . Is there a patch I can test out or does anyone have a suggestion on how to fxi?
[jQuery] say goodbye to sifr
http://www.appleinsider.com/articles/08/02/07/apples_safari_3_1_to_support_downloadable_web_fonts_more.html
[jQuery] ajax file uploads: getting strange error
Hi, I just downloaded the latest version of the ajax file upload plugin (http://www.phpletter.com/Demo/AjaxFileUpload-Demo/). I have created a test page http://elearningrd.info/test.php but every time I upload a file, the error callback is invoked and the message "Syntax error: Invalid label" is displayed. My file does get uploaded to the proper directory, but the error is troubling me. What does it mean and any ideas how to resolve it? Thanks, - Dave
[jQuery] Re: Is there a feature as addID like addClass in jQuery?
mtest wrote: : How I can add ID like I add class by function addClass? You can't. IDs are one-to-one relationships with their tags. addClass adds a class to a tag which may already have another class. Each tag can have many classes. An addID method would allow more than one ID per tag, which breaks the rules of CSS. What your example implies is that you need a way to change an ID attribute to a set of html tags. : For example i have: : : Some text #1 : Some text #2 : : And i want see this result: : Some text #1 : Some text #2 : : I don't know how make this, please help. : Maybe like this :): : : $(document).ready(function() { :var i = 1; :$("div").each(function(){ :this.addID("Div"+ "1"); :}); : }); $(document).ready(function(){ $('div').each( function(i){ $(this).attr({ id: 'div' + ++i }); }) }); HTH, Charles K. Clarkson -- Mobile Homes Specialist Free Market Advocate Web Programmer 254 968-8328 http://www.clarksonenergyhomes.com/wordpress/about/
[jQuery] Re: Problems with "frames"
This is the page: http://ideamill.synaptrixgroup.com/?page_id=18 So, you're doing your development off of a web server? Perhaps you could install either an XAMPP or LAMP environment on your machine? - jake On Feb 8, 2008 4:06 AM, Androrion <[EMAIL PROTECTED]> wrote: > > > Could you explain me why frames shouldn't be needed for what I described? As > I don't have any web server, I cannot use simple divs and include my pages > as I want, like i would do with php or jsp, isn't it? If you have another > solution, I take it : I don't want to use frames, it's just I can't figure > out how else I can do. > About the url you gave me, the page doesn't seem to exist anymore :( Do you > know where i could find this plugin? > > Thanks a lot for your help! > > > > Jake McGraw wrote: > > > > > > If you're using frames (which shouldn't be needed for what you're > > describing) try using the frameReady plugin, > > http://ideamill.synaptrixgroup.com/?p=6. Pay attention to the load > > option for including the accordian plugin in your target frame. > > > > - jake > > > > On Jan 25, 2008 8:55 AM, Androrion <[EMAIL PROTECTED]> wrote: > >> > >> > >> Hi all, > >> > >> I'm currently working on a static website using some javascript effects. > >> So > >> far i'm very impressed by the possibilities offered by jQuery and that's > >> why > >> i chose this framework, but now i have a little problem. > >> The web site i wanna create is very classic : a header, a footer, a > >> side-bar navigation menu and a main frame. > >> Wanting to avoid the use of iframe, i tried some with the jQuery > >> load > >> function. It seems to work but when i want to insert an accordion menu in > >> the menu div, it doesn't work... The only solution i found was to write > >> the > >> menu code in my index page, which is quite... ugly... > >> > >> Does anybody know how i could fix that, and use jQuery in every "frame"? > >> > >> > >> > >> -- > >> View this message in context: > >> http://www.nabble.com/Problems-with-%22frames%22-tp15087899s27240p15087899.html > >> Sent from the jQuery General Discussion mailing list archive at > >> Nabble.com. > >> > >> > > > > > > -- > View this message in context: > http://www.nabble.com/Problems-with-%22frames%22-tp15087899s27240p15351625.html > > Sent from the jQuery General Discussion mailing list archive at Nabble.com. > >
[jQuery] Re: Is it possible to send javascript vars TO a jquery function??
Just what is a jQuery collection that we pass along into jQuery? I feel like I'm missing something to be able to use jQuery for my own data. On Feb 9, 8:43 am, cbmtrx <[EMAIL PROTECTED]> wrote: > Thanks lihao. > > Actually, there are cases when there would be more than one "newdiv" > following an "olddiv"...which means that the jquery .next identifier > wouldn't always work. ie: It's not a 1:1 ratio. So I've been trying to > find the most simple&elegant solution, without resorting to the old > javascript functions... > > From what little I've learned so far, jquery seems to work mostly in > one direction (JQ -> DOM) and it doesn't seem all that geared up for > doing things the other way around (unless you use a plugin like > metadata for passing vars, which isn't any simpler). > > Emlyn > > On Feb 8, 11:35 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > On Feb 8, 4:08 pm, cbmtrx <[EMAIL PROTECTED]> wrote: > > > > OK, I'll need to look into this click event. If it's worth rewriting > > > (because the original degrades poorly) then I'll probably do it this > > > way. > > > > Was hoping jquery would simplify!! :/ > > > For your sample code, you don't need that javascript link, you can > > just define 'click(toggle)' event for element and then trigger > > it in elememt's 'click' event. using 'class' instead of 'id' > > and letting jQuery help you find corresponding DIVs can make your code > > simpler (you can extend this into more than 2 groups easily): > > > > > Open 1 > > > > > Default page content > > > > > > > > > New page content > > > > > > > > > > > Open 2 > > > > > Default page content > > > > > > > > > New page content > > > > > > > > > > > $('a').toggle(function() { > > $(this).next('div.olddiv').hide() > > .next('div.newdiv').show(); > > }, function() { > > $(this).next('div.olddiv').show() > > .next('div.newdiv').hide(); > > }); > > $('[EMAIL PROTECTED]"Close"]').click(function() { > > $(this).parents('div.newdiv').prevAll('a:first').click(); > > }); > > > > > Regards, > > lihao(XC)
[jQuery] Re: Is it possible to send javascript vars TO a jquery function??
Thanks lihao. Actually, there are cases when there would be more than one "newdiv" following an "olddiv"...which means that the jquery .next identifier wouldn't always work. ie: It's not a 1:1 ratio. So I've been trying to find the most simple&elegant solution, without resorting to the old javascript functions... >From what little I've learned so far, jquery seems to work mostly in one direction (JQ -> DOM) and it doesn't seem all that geared up for doing things the other way around (unless you use a plugin like metadata for passing vars, which isn't any simpler). Emlyn On Feb 8, 11:35 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Feb 8, 4:08 pm, cbmtrx <[EMAIL PROTECTED]> wrote: > > > OK, I'll need to look into this click event. If it's worth rewriting > > (because the original degrades poorly) then I'll probably do it this > > way. > > > Was hoping jquery would simplify!! :/ > > For your sample code, you don't need that javascript link, you can > just define 'click(toggle)' event for element and then trigger > it in elememt's 'click' event. using 'class' instead of 'id' > and letting jQuery help you find corresponding DIVs can make your code > simpler (you can extend this into more than 2 groups easily): > > > Open 1 > > > Default page content > > > > > New page content > > > > > > Open 2 > > > Default page content > > > > > New page content > > > > > > $('a').toggle(function() { > $(this).next('div.olddiv').hide() > .next('div.newdiv').show(); > }, function() { > $(this).next('div.olddiv').show() > .next('div.newdiv').hide(); > }); > $('[EMAIL PROTECTED]"Close"]').click(function() { > $(this).parents('div.newdiv').prevAll('a:first').click(); > }); > > > Regards, > lihao(XC)
[jQuery] Count rows with FlyDOM
Hi there, is there any chance to create multiple rows of a table in a for to have rows counted and the id# appended to the input element name? Has anyone tried to achieve this?
[jQuery] Re: Use jQuery after a jQuery load
Hello, thanks a lot for the hint! It works !! (I used the Live Query Plugin) But i still have one problem which doens't work with: I also work with the Thickbox plugin (http://jquery.com/demo/ thickbox/). I'm able to load some pictures inside a div field - no prob- but thickbox doens't work anymore when I load some content in my site :( So the problem is quite the same like the first one... is there a solution? On 4 Feb., 15:04, Karl Swedberg <[EMAIL PROTECTED]> wrote: > On Feb 4, 2008, at 3:12 AM, fufolewe wrote: > > > > > However, so i'm able to load some content in the div-container BUT > > within the div field i would like to use jQuery AGAIN! And it doesn't > > work :( > > [...] > > so the main problem is: when i load a div field which also contains > > jQuery statements - it doesn't work. I also tried, to load the jQuery > > statements in the initial site, so it only have to load the new > > content but not the jQuery stuff but this also didn't work... > > > Does anybody know how this could work??? > > Hi, > > This question is asked quite frequently. > > http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_st... > > After reading the FAQ, let us know if you still can't get it to work > properly. > > --Karl > _ > Karl Swedbergwww.englishrules.comwww.learningjquery.com
[jQuery] Re: jQuery form plugin error with examples.
Ok, Please discard this post. Errors had been totally due to my own oversight :-((. -Sathya Sathyakumar wrote: > > Hi, > I am using jQuery 1.2 with form plugin. Am new to jQuery, so bear with me > if the doubt sounds silly. I was trying out the first example in the form > plugin > > > My Html code goes something like this > > > > > > .Rest of the code containing form data > > And my common.js reads > > jQuery(document).ready(function() { > var options = { > target:'#output1', // target element(s) to be updated > with server response > beforeSubmit: showRequest, // pre-submit callback > success: showResponse // post-submit callback > > // other available options: > //url: url // override for form's 'action' attribute > //type: type// 'get' or 'post', override for form's > 'method' attribute > //dataType: null// 'xml', 'script', or 'json' (expected > server response type) > //clearForm: true// clear all form fields after successful > submit > //resetForm: true// reset the form after successful submit > > // $.ajax options can be used here too, for example: > //timeout: 3000 > }; > > // bind form using 'ajaxForm' > jQuery('form').ajaxForm(options); > > }); > > Now I am not able to run this succesfully. With FireFox, I get an error > "jQuery("form").ajaxForm is not a function" > > Can someone point to me the mistake I'm doing. I've double checked the > paths to the js files. Any help will be greatly appreciated. > > Regards > Sathya > -- View this message in context: http://www.nabble.com/jQuery-form-plugin-error-with-examples.-tp15371332s27240p15371966.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: jQuery form plugin error with examples.
Ok, I started using jQuery1.1 and it started working . But now I'm facing a different problem that the example doesnt work as prescribed. I created two options beforeSubmit: showRequest, success: showResponse. But these two functions dont seem to get called. I am not able to get around this problem now. Any help will be greatly appreciated, Regards Sathya Sathyakumar wrote: > > Hi, > I am using jQuery 1.2 with form plugin. Am new to jQuery, so bear with me > if the doubt sounds silly. I was trying out the first example in the form > plugin > > > My Html code goes something like this > > > > > > .Rest of the code containing form data > > And my common.js reads > > jQuery(document).ready(function() { > var options = { > target:'#output1', // target element(s) to be updated > with server response > beforeSubmit: showRequest, // pre-submit callback > success: showResponse // post-submit callback > > // other available options: > //url: url // override for form's 'action' attribute > //type: type// 'get' or 'post', override for form's > 'method' attribute > //dataType: null// 'xml', 'script', or 'json' (expected > server response type) > //clearForm: true// clear all form fields after successful > submit > //resetForm: true// reset the form after successful submit > > // $.ajax options can be used here too, for example: > //timeout: 3000 > }; > > // bind form using 'ajaxForm' > jQuery('form').ajaxForm(options); > > }); > > Now I am not able to run this succesfully. With FireFox, I get an error > "jQuery("form").ajaxForm is not a function" > > Can someone point to me the mistake I'm doing. I've double checked the > paths to the js files. Any help will be greatly appreciated. > > Regards > Sathya > -- View this message in context: http://www.nabble.com/jQuery-form-plugin-error-with-examples.-tp15371332s27240p15371640.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Using $ symbol to access jQuery function
Hi, I am not sure What I'm doing wrong, but accessing jQuery function using a $ symbol doesn't work. For example, ${document}.ready(function() gives me an error "missing ; before statement". The same works when I use jQuery(document).read(function() I've tried both JQuery1.2 and 1.1 Regards Sathya -- View this message in context: http://www.nabble.com/Using-%24-symbol-to-access-jQuery-function-tp15371525s27240p15371525.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Plugin-Request: Boxover?
Hey guys, iam using a great piece of JavaScript-Code from time to time, its named "BoxOver" and is a ToolTip-Script for JavaScript which can be found here: http://boxover.swazz.org, some examples: http://boxover.swazz.org/example.html . I've searched for a similar Plugin for jQuery, but nothing was that flexibel and lightweight (boxover is just 5kb compressed). My idea is, to port this great peace of code to an flexibel jquery- plugin. Normaly, you configure BoxOver over the title-attribute... with jquery you could get the data out of another inline-container or a ajax- call... that would be great... also the chaining abilitys would be great, configuration directly from the script.. awesome ;) My problem is that iam not the js-king and not that good in creating plugins for jquery. So iam asking if anybody could could do this or has some good hints how i could get it done... Anybody out there? ;)
[jQuery] serializeArray() function and select tags
hey fellow jQuery-ers, I've noticed this small thing using the serializeArray() on a form. consider the following html: add edit whatever it has a simple form with a select tag. nothing fancy here. I want to serialize the form's input values so I do this in firebug: >>> $("form#frmFoo").serializeArray() [] >>> $("form#frmFoo").serialize() "" the strange thing here is that won't return anything at allnada! it's either an empty string or an empty array. It will work once I add a a "name" attribute to the select tag: >>> $("form#frmFoo").serialize() "mySelect=0" >>> $("form#frmFoo").serializeArray() [Object name=mySelect value=0] are there some html specs I missed on the matter? Bernard
[jQuery] Re: Is it possible to send javascript vars TO a jquery function??
On Feb 8, 4:08 pm, cbmtrx <[EMAIL PROTECTED]> wrote: > OK, I'll need to look into this click event. If it's worth rewriting > (because the original degrades poorly) then I'll probably do it this > way. > > Was hoping jquery would simplify!! :/ For your sample code, you don't need that javascript link, you can just define 'click(toggle)' event for element and then trigger it in elememt's 'click' event. using 'class' instead of 'id' and letting jQuery help you find corresponding DIVs can make your code simpler (you can extend this into more than 2 groups easily): Open 1 Default page content New page content Open 2 Default page content New page content $('a').toggle(function() { $(this).next('div.olddiv').hide() .next('div.newdiv').show(); }, function() { $(this).next('div.olddiv').show() .next('div.newdiv').hide(); }); $('[EMAIL PROTECTED]"Close"]').click(function() { $(this).parents('div.newdiv').prevAll('a:first').click(); }); Regards, lihao(XC)
[jQuery] jQuery form plugin error with examples.
Hi, I am using jQuery 1.2 with form plugin. Am new to jQuery, so bear with me if the doubt sounds silly. I was trying out the first example in the form plugin My Html code goes something like this .Rest of the code containing form data And my common.js reads jQuery(document).ready(function() { var options = { target:'#output1', // target element(s) to be updated with server response beforeSubmit: showRequest, // pre-submit callback success: showResponse // post-submit callback // other available options: //url: url // override for form's 'action' attribute //type: type// 'get' or 'post', override for form's 'method' attribute //dataType: null// 'xml', 'script', or 'json' (expected server response type) //clearForm: true// clear all form fields after successful submit //resetForm: true// reset the form after successful submit // $.ajax options can be used here too, for example: //timeout: 3000 }; // bind form using 'ajaxForm' jQuery('form').ajaxForm(options); }); Now I am not able to run this succesfully. With FireFox, I get an error "jQuery("form").ajaxForm is not a function" Can someone point to me the mistake I'm doing. I've double checked the paths to the js files. Any help will be greatly appreciated. Regards Sathya -- View this message in context: http://www.nabble.com/jQuery-form-plugin-error-with-examples.-tp15371332s27240p15371332.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] [validate] changing the error default position
How i can change the default position of one element when i get one error? I want the error dosnt appear appened to the checkbox. [ ] I accept the rules with error: [ ] You must accept thisI accept the rules
[jQuery] Re: getting elements tag type
On Feb 9, 2008, at 7:57 AM, Eridius wrote: now lets say the i have this var element = $('#input_element'); is there a way i get get what type of html element this element is(in the case it would be a input tag)? sure. try this: element[0].nodeName --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com
[jQuery] getting elements tag type
now lets say the i have this var element = $('#input_element'); is there a way i get get what type of html element this element is(in the case it would be a input tag)? -- View this message in context: http://www.nabble.com/getting-elements-tag-type-tp15371435s27240p15371435.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.