[jQuery] Re: Can I access and change content loaded dynamically after jQuery.js?
Ryura thanks for the link. I'll try it although I want to learn and know how to deal without a plugin :) Ricardo, this looks like it does what I want :) Let's say I want the content (loaded via the load method) hide/show or catch some clicks inside it. Then I have to put all the code for all pages I'll load inside the callback function? $(#content).load(loadLink, function(){ hideLoader(); // Hide DIV1 // click this and make that // some code for page 1 // code for page 2,3 … // open new window by clicking on … // and so on }) Is this the appropriate way, how it's done in most cases? Hope you can send me answer and thanks for your help!! On 22 Dez., 02:11, Ricardo Tomasi ricardob...@gmail.com wrote: If you add the event handlers to the callback you can get it working: $(#content).load(loadLink, function(){ hideLoader(); $('.details').hide(); $('.showDetails').click(function() { $('.details').slideToggle('slow'); return false; }); }) On Dec 21, 4:20 pm, suntrop sprungm...@googlemail.com wrote: Sorry for that, but how can I bind the event after I call $ (#content).load(loadLink,,hideLoader);? Do I have to replace hideLoader with a function that contains all the new code? Thanks for your help! On 21 Dez., 17:30, DumpsterDoggy chris.mis...@gmail.com wrote: You can't bind any events to the controls on $(document).ready() if the html isn't there. I would try binding the event after you call $ (#content).load(loadLink,,hideLoader); On Dec 21, 10:17 am, suntrop sprungm...@googlemail.com wrote: Hi there. I am loading some content into my page … $(#content).load(loadLink,,hideLoader); The file behind loadLink (e.g. contact.php) has some tables with class=details and I want them to be hidden and not shown until I click the link before it. $('.details').hide(); $('.showDetails').click(function() { $('.details').slideToggle('slow'); return false; }); But for some reason it doesn't work. The table .details is displayed and when I click the link .showDetails nothing happens (I tried to alert something, nothing here too). I am afraid of it is not working with content loaded dynamically after my page with the jQuery JS is loaded. Because jQuery doesn't knows the new .details table??
[jQuery] Re: jqGrid with web service of .net framwork
Hello, To call web service in jqGrid you should implement datatype as function. To have idea haw can be done, go into the demonstartion page and look at New in version 3.3 - Data type as function. Hope this helps Best Regards Tony On Dec 19, 8:35 pm, FrenchiINLA mamali.sohe...@gmail.com wrote: Is there anyone who could work withjqGridand web services in a asp.net project? I really try hard to just be able to call the method in my web service for no avail. I have the following in my html file: script type=text/javascript $(function() { $('#list').jqGrid({ url: 'Services/Bill.asmx/Get_Client_jqGrid' , datatype: 'xmlstring' , colNames: ['Name'] , colModel: [ { name: 'CltName', index: 'CltName', width: 55 } ] , caption: Client }); //jqGrid }); // ready /script div table id=list class=scroll /table /div And I made a web service with the following signature: [WebMethod] public string Get_Client_jqGrid() { // just some code to test the HttpContext.Current.Request.Params[]} I put a breakpoint in the web service but it’s never been called. I get jut the header with Loading message. any help would be really appreciated. I tried a grid with local data, and the edit return perfectly to another WebMethod of the web service.
[jQuery] Re: How refresh a div with a link?
Any idea How I can work it out? Dom -- View this message in context: http://www.nabble.com/How-refresh-a-div-with-a-link--tp21070429s27240p21124698.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] ajaxStart don't work for ajax/load?
hi i want to show/hide a loader when using load() function but using .ajaxStart / .ajaxStop functions doesn't work. Is it right? With this script: $('#load') .ajaxStart(function() { $(this).show(); }) .ajaxStop(function() { $(this).hide(); }); $('#colCont').load('myFile.php?id=myId #colContIns'); $('#categorie a').click(function(){ var id = $(this).attr('id'); var s = new Array(); s = id.split('_'); $('#colCont').load('prodotti/ famiglie.php?id='+s[1]+' #colContIns'); return false; }); the loader shows only on its first call but not when i load html fragments from other links. Any idea? Thanks VItto
[jQuery] Re: TableSorter Pagination -- Breaks when wrapped in table [example]
still looking for a solution... ripcurlksm wrote: I have a working version of the jQuery TableSorter but when I wrap the div in a table, the pagination stops working. This appears to be a CSS issue when the table is wrapped? Here is the broken pagination, with it wrapped in a table (try to click the next page button, its broke!): http://www.psylicyde.com/_old/pagination-bug/index-broke.html Here is the same example as above, but not wrapped in a table and its working fine: http://www.psylicyde.com/_old/pagination-bug/index-working.html Here is the source code for both examples: http://www.psylicyde.com/_old/pagination-bug/pagination-bug.zip -- View this message in context: http://www.nabble.com/TableSorter-PaginationBreaks-when-wrapped-in-table--example--tp20546095s27240p21125196.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] corner plugin ie7 bug
i i got a weird error using the jquery.corner plugin on ie7. I attached two image. The wrong one is how the page appears in ie7 (look at the red square on the right where the corner get), the right one is for all the other browser..(ie6 included..!!!) http://www.azero.it/checkImg/tasker_wrong.jpg http://www.azero.it/checkImg/tasker_right.jpg here's the css rule for that block.. .blocchi{background:#dcdcdc;margin:10px 10px 0 10px;overflow:hidden;padding:10px 10px 40px;width:840px;} it works right if i dont't give it any width / padding left-right. But i have to give it a width 'cause it contains some float element. Anyone has have it yet? VItto
[jQuery] Re: Spammer bypassing JQ Validate to register?
Hi, [ I tried to post this yesterday before the other replies came in but it got bounced; here's my initial reply which is pretty much the same answer as those posted since: ] Aside from turning JavaScript off, hackers won't use a web browser to attack your site, they just send web requests direct to your server without using a browser. You can't rely on client side validation, you must use server side validation as well. I cannot stress that highly enough - client side validation is only something to add on to existing server side validation for those clients who support (or don't deliberately bypass) client side validation. -- Kenny On Sun, Dec 21, 2008 at 11:29 PM, Dan G. Switzer, II dswit...@pengoworks.com wrote: So, this dude from Poland managed to register without a first name, without a last name and likely without an invitation code. I'll deal with the EE issues separately, but is there a known issue where someone can mess with the jquery in the page to bypass the validation that is running? As David said, client-side validation is purely for the benefit of the user--it offers no security to your site. All you need to do is to turn off JavaScript to bypass the validation (however, the spammer is problem just using a bot to post directly to your submission page.) -Dan
[jQuery] how to display ads after page load
Hi, In my application, I have some ads which are from other sites. They gave us the Javascript to display their ads. Its taking time to load the entire page, because of their ads. So I am trying to load their script after loading the page. How can i do this? Can anyone help me. Thanks, Mohan
[jQuery] HOW: jQuery AJAX to replace iFRAME
Hi Currently my page has a iFrame (loads an external web-page) in it. I have seen this tutorial that uses simple AJAX to replace this iFrame. http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm (see the small DEMO, I want exactly the same with just 2 Links) My question is - How can I do the same using jQuery's AJAX to do the same ? Thats is, when these 2 Button/Link hit, it will fetch corresponding remote html and paste it in a DIV. Thats it. Please do reply. Ayan Debnath INDIA.
[jQuery] jqModal ajax question
Hi, I was wondering if someone could help me with the jqModal plugin (http://dev.iceburg.net/jquery/jqModal/). Basically, I want to pass some GET data when calling an AJAX link for the modal box but am not sure how to do it. My setup for the modal box is: $('#jInfo').jqm({ajax: 'loadinfo.php', trigger: 'false'}); And I'm calling it through a function: function(t) { $('#jInfo').jqmShow(); } And I would like to have it call something like: loadinfo.php?id=t (where 't' is the function variable) Any help much appreciated Cheers, Sean
[jQuery] Objected Expected $ Conflict?
I'm trying to build a simple news carousel, click a tab and the corresponding div shows. My Code works in FF, Chrome, Opera and Safari but no luck in IE 6 or 7. I think it has something to do with $, because IE7 is saying there is an Object Expected at that char position. Any help is appreciated, my code is below. script src=js/jquery-1.2.6.min.js type=text/javascript/script script type=text/javascript !-- current = 1; function showSlide(slideNum) { if (slideNum != current){ $('#carousel #item' + current).fadeOut(slow).addClass (hidden); $('#carousel #item' + slideNum).fadeIn(slow).removeClass (hidden); current = slideNum; } } //-- /script
[jQuery] Re: Beginner question about toogeling a status
Hi Brian! your idea was great! Thanks! It works all very well expect one little piece On 11 Dez., 18:50, brian bally.z...@gmail.com wrote: Something like this: $(document).ready(function(){ $('div.statusimg').click(function() { var status = this; var her_id = status.id; /* remove all 2nd classes to reveal default state (eg. animation) */ $(status).removeClass('active', 'inactive', 'no_login'); $.ajax({ type: POST, url: /admin/ajax_toogle_manufacturer_status.php, data: her_id= +her_id, success: function(msg){ /* get the new status from the returned data */ status.addClass(the_new_status); } }); }) }); This: status.addClass(the_new_status); prints the new status, but the browser does not show the image which is connected with the new status class? Can I somehow refresh the div only? Is that possible? Thanks Heidi
[jQuery] Re: jquery for slideshows
I'd also like to add sound to a slideshow (the above mentioned cross slide would be great), did you manage to do this? I would suggest took soundmanager2 (http://www.schillmania.com/projects/soundmanager2/). Please drop a line if you manage to add sound to cross slide On 22 Nov, 17:41, Milan Andric mand...@gmail.com wrote: Thanks Sia, Do you have any recommendation on how to handle audio with javascript? Let's say I also want to play an audio/mp3 file along with the slideshow ... -- Milan On Nov 21, 8:50 pm, Sai Krishna psaikrishna@gmail.com wrote: I found this through stumble. Thanks to Jquery. It reduces flash costhttp://www.gruppo4.com/~tobia/cross-slide.shtmlhttps://lan.solugenix.net/exchweb/bin/redir.asp?URL=http://www.gruppo... Sai Krishna On Sat, Nov 22, 2008 at 6:57 AM, Milan Andric mand...@gmail.com wrote: Hello, I am working on a project where one component is a slideshow application with audio. I'm wondering if I can use jquery/javascript for this. If anyone has any links to examples or ideas of ways to deal with a series of images and audio file that synchronizes with the images in javascript, it would be greatly appreciated. A first step would be a jquery library that supports a configurable slideshow with audio. Eventually I would like to build something similar to the slideshare sync tool, which allows you to synchronize audio with images. This version is done in flash. I'm wondering if javascript could accomplish the same things. http://www.flickr.com/photos/johntynan/3032282040/ http://www.slideshare.net/faqs/slidecast#1g Thanks for you help, Milan Andric http://m.andric.us/- Nascondi testo citato - Mostra testo citato -
[jQuery] Re: jqModal ajax question
simplest way is to use it like this: html : a href=page/to/load/loadinfo.php?var=valfoo=bar class=jqModalLoad the page/a then initiate your jqmodal like this: javascript: $(document).ready(function(){ $(.jqm({trigger: 'a.jqModal',ajax:'@href'}); }); HTH alexandre On Mon, Dec 22, 2008 at 8:49 AM, strangevoi...@gmail.com wrote: Hi, I was wondering if someone could help me with the jqModal plugin (http://dev.iceburg.net/jquery/jqModal/). Basically, I want to pass some GET data when calling an AJAX link for the modal box but am not sure how to do it. My setup for the modal box is: $('#jInfo').jqm({ajax: 'loadinfo.php', trigger: 'false'}); And I'm calling it through a function: function(t) { $('#jInfo').jqmShow(); } And I would like to have it call something like: loadinfo.php?id=t (where 't' is the function variable) Any help much appreciated Cheers, Sean
[jQuery] Re: HOW: jQuery AJAX to replace iFRAME
say the container that will display the loaded content, i.e, your iframe becomes div id=menu a href=page/to/load.html class=ajaxLinkclick me/a a href=page/to/load2.html class=ajaxLinkclick me 2/a div id=ihateiframes pthis will be replaced/p /div your javascript will be: $(document).ready(function(){ $('a.ajaxLink').click(function(){ var url = $(this).attr('href'); $('#ihateiframes').empty().load(url); }); }); On Mon, Dec 22, 2008 at 6:51 AM, Ayan ios...@gmail.com wrote: Hi Currently my page has a iFrame (loads an external web-page) in it. I have seen this tutorial that uses simple AJAX to replace this iFrame. http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm (see the small DEMO, I want exactly the same with just 2 Links) My question is - How can I do the same using jQuery's AJAX to do the same ? Thats is, when these 2 Button/Link hit, it will fetch corresponding remote html and paste it in a DIV. Thats it. Please do reply. Ayan Debnath INDIA.
[jQuery] attributes setting appending rather than clearing
I am setting the click attribute of an anchor tag using query on the document ready event. Once the user has clicked on this link I am attempting to change the click event to call another method than the one initialy setup. Instead of replacing the old method is simply appends the new method so that both methods are called . any help would be great ! thanks
[jQuery] Re: Objected Expected $ Conflict?
Try replacing $ with jQuery and see if you get the same error (this will tell you if it's a conflict or something else) but it makes no sense that $ would work on one browser but not another, regardless, doing the above will help diagnose On Dec 22, 3:17 am, Pete peterberna...@gmail.com wrote: I'm trying to build a simple news carousel, click a tab and the corresponding div shows. My Code works in FF, Chrome, Opera and Safari but no luck in IE 6 or 7. I think it has something to do with $, because IE7 is saying there is an Object Expected at that char position. Any help is appreciated, my code is below. script src=js/jquery-1.2.6.min.js type=text/javascript/script script type=text/javascript !-- current = 1; function showSlide(slideNum) { if (slideNum != current){ $('#carousel #item' + current).fadeOut(slow).addClass (hidden); $('#carousel #item' + slideNum).fadeIn(slow).removeClass (hidden); current = slideNum; } } //-- /script
[jQuery] jcarousel autostart
could anyone please explain how to start/stop autoscrolling of the jcarousel by clicking on an external link on the page?
[jQuery] submit a form with a link
Hello! I'm using jquery to validate a form and that I'm using this link to to the submit: a href=javascript:void(0); onclick=document.form.submit(); Submit /a The problem is that this kind of submit doesn't activate the jquery validation. How can I do to force the validation? Thanks!! Sole
[jQuery] submit a form with a link
I`m using jquery validation to validate my form and I have a problem when I want to submit my form with a link instead of using this: input type=submit value=Submit name=Submit class=fboton . The problem is that the submit link doesn't activate the jquery validation of the form. Can anybody help me with this? Thanks!! sole.
[jQuery] Re: Objected Expected $ Conflict?
Also for ids, it's better to write $('#item' + slideNum) than $('#carousel #item' + slideNum). On Dec 22, 6:19 am, MorningZ morni...@gmail.com wrote: Try replacing $ with jQuery and see if you get the same error (this will tell you if it's a conflict or something else) but it makes no sense that $ would work on one browser but not another, regardless, doing the above will help diagnose On Dec 22, 3:17 am, Pete peterberna...@gmail.com wrote: I'm trying to build a simple news carousel, click a tab and the corresponding div shows. My Code works in FF, Chrome, Opera and Safari but no luck in IE 6 or 7. I think it has something to do with $, because IE7 is saying there is an Object Expected at that char position. Any help is appreciated, my code is below. script src=js/jquery-1.2.6.min.js type=text/javascript/script script type=text/javascript !-- current = 1; function showSlide(slideNum) { if (slideNum != current){ $('#carousel #item' + current).fadeOut(slow).addClass (hidden); $('#carousel #item' + slideNum).fadeIn(slow).removeClass (hidden); current = slideNum; } } //-- /script
[jQuery] GET MULTIPLE VALUE FROM jQuery for external file loader
Hi! I use jQuery Loader Content to auto complete the state select tag. function loadContentKabupatenKotaDiploma(id) { $(#contenPanKabupatenKotaDiploma).hide(); $(#contenPanKabupatenKotaDiploma).load(../dre-includes/ url_pendidikan/findKabupatenKota.php?id=+id+, '', callbackKabupatenKotaDiploma); } function callbackKabupatenKotaDiploma() { $(#contenPanKabupatenKotaDiploma).show(); } $(document).ready(loadContentKabupatenKotaDiploma(id)); then here are the html code: labelPropinsi/label ? $query=SELECT * FROM master_propinsi; $result=mysql_query($query); ? select class=input name=id_propinsi_pendidikan[] onChange=loadContentKabupatenKotaDiploma(this.value) option value=Pilih Propinsi/option ? while($rows = mysql_fetch_array($result)) { ? option value=? echo $rows['id']; ?? echo $rows ['nama_propinsi']; ?/option ? } ? /select div class=spacernbsp;/div div id=contenPanKabupatenKotaDiplomanbsp;/div I create a script for external file: findKabupatenKota.php labelKabupaten/Kota/label select class=input id=id_kabupaten_kota_pendidikan name=id_kabupaten_kota_pendidikan[] optionPilih Kabupaten/Kota/option ? while($row=mysql_fetch_array($result)) { ? option value=? echo $row['id']; ?? echo $row ['nama_kabupaten_kota']; ?/option ? } ? /select AND now I want to get the value of id_kabupaten_kota_pendidikan[]. I try this way for POST FORM Action: for($d=0;$d = count($_POST['nama_pt']);$d++) { $jQueryKabKPendidikan[$d] = script$ ('[...@name=id_kabupaten_kota_pendidikan]')[$d].val(); /script; if(!empty($_POST['nama_pt'][$d])) { mysql_query(INSERT INTO `data_pendidikan_terakhir` ( `id_peserta` , `id_jenjang` , `tahun_lulus` , `id_jurusan` , `nama_pt` , `id_propinsi` , `id_kabupaten_kota` , `tanggal_input` ) VALUES ( '.$noUrut.', '.clearString($_POST['id_jenjang'][$d]).', '', '.clearString($_POST['id_jurusan'][$d]).', '.clearString($_POST['nama_pt'][$d]).', '.clearString($_POST['id_propinsi_pendidikan'][$d]).', '.clearString($jQueryKabKPendidikan[$d]).', '.thisTime.')); } } The result is $jQueryKabKPendidikan[$d] = 0; Well... do you have one idea to get multiple value from a selected field ? and is combination of jQuery + PHP a better way ??? Or I must use a complete Ajax Post Action without PHP ? Regard
[jQuery] GET MULTIPLE VALUE FROM jQuery for external file loader
Hi! I use jQuery Loader Content to auto complete the state select tag. function loadContentKabupatenKotaDiploma(id) { $(#contenPanKabupatenKotaDiploma).hide(); $(#contenPanKabupatenKotaDiploma).load(../dre-includes/ url_pendidikan/findKabupatenKota.php?id=+id+, '', callbackKabupatenKotaDiploma); } function callbackKabupatenKotaDiploma() { $(#contenPanKabupatenKotaDiploma).show(); } $(document).ready(loadContentKabupatenKotaDiploma(id)); then here are the html code: labelPropinsi/label ? $query=SELECT * FROM master_propinsi; $result=mysql_query($query); ? select class=input name=id_propinsi_pendidikan[] onChange=loadContentKabupatenKotaDiploma(this.value) option value=Pilih Propinsi/option ? while($rows = mysql_fetch_array($result)) { ? option value=? echo $rows['id']; ?? echo $rows ['nama_propinsi']; ?/option ? } ? /select div class=spacernbsp;/div div id=contenPanKabupatenKotaDiplomanbsp;/div I create a script for external file: findKabupatenKota.php labelKabupaten/Kota/label select class=input id=id_kabupaten_kota_pendidikan name=id_kabupaten_kota_pendidikan[] optionPilih Kabupaten/Kota/option ? while($row=mysql_fetch_array($result)) { ? option value=? echo $row['id']; ?? echo $row ['nama_kabupaten_kota']; ?/option ? } ? /select AND now I want to get the value of id_kabupaten_kota_pendidikan[]. I try this way for POST FORM Action: for($d=0;$d = count($_POST['nama_pt']);$d++) { $jQueryKabKPendidikan[$d] = script$ ('[...@name=id_kabupaten_kota_pendidikan]')[$d].val(); /script; if(!empty($_POST['nama_pt'][$d])) { mysql_query(INSERT INTO `data_pendidikan_terakhir` ( `id_peserta` , `id_jenjang` , `tahun_lulus` , `id_jurusan` , `nama_pt` , `id_propinsi` , `id_kabupaten_kota` , `tanggal_input` ) VALUES ( '.$noUrut.', '.clearString($_POST['id_jenjang'][$d]).', '', '.clearString($_POST['id_jurusan'][$d]).', '.clearString($_POST['nama_pt'][$d]).', '.clearString($_POST['id_propinsi_pendidikan'][$d]).', '.clearString($jQueryKabKPendidikan[$d]).', '.thisTime.')); } } The result is $jQueryKabKPendidikan[$d] = 0; Well... do you have one idea to get multiple value from a selected field ? and is combination of jQuery + PHP a better way ??? Or I must use a complete Ajax Post Action without PHP ? Regard
[jQuery] Bizarre rendering issue (FF 3, IE 6)
I am having an issue with the following jQuery code: http://www.houseofoverlord.com/c/jeniffer/bhive/test2.html http://www.houseofoverlord.com/c/jeniffer/bhive/test2.html The rendering that is not occurring is when the page: * Loads * When clicking the main (horizontal) menu items What is supposed to happen is the default (first) navsecondary a tag is supposed to receive a current class designation. If I console.log, everything seems fine, but the screen display does not show the change, and the HTML view in Firefox does not demonstrate the update (class=current). If you click on about us and then click on what we do, that behavior is supposed to happen automatically when clicking the about us menu link. Anybody know what's going on? Thanks! Jared -- View this message in context: http://www.nabble.com/Bizarre-rendering-issue-%28FF-3%2C-IE-6%29-tp21127522s27240p21127522.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] How can i use the flash action sctip to jquery
hi, My name is jaikumar . I am a web designer. I am just now find the your jquery is very intersting. Easily understanding. This one how can i use flash actionsctip file. plese send detail my mail id. Ur New tutorial and ideas plese send my email id. Best Regards R.Jaikumar
[jQuery] Masked Input Plugin 1.2.1 Released
There is now a new version of my Masked Input Plugin ( http://digitalbush.com/projects/masked-input-plugin/ ) for jQuery. Version 1.2.1 moves one step closer to my bigger picture for the plugin. I had to make a few breaking changes to do so, but I feel that the end result is worth it. This release adds a lot more polish to the 1.2 release. Here's what we've got. * BREAKING CHANGE: Removed deprecated $.mask.addPlaceholder method. Use the $.mask.definitions['']=; syntax instead. I said I was going to do this on the last release and now seems just as good a time as any. * BREAKING CHANGE: Removed allowPartial option in favor of new mask syntax I'll describe below. A discussion and code exchange with Michael Bray inspired this change. I hate that it's a breaking change, but the new way makes a lot more sense. * New mask syntax option '?'. Anything listed after '?' within the mask is considered optional user input. The common example for this is phone number + optional extension. The new syntax will look like this: (999) 999-? x9 * I got rid of the awkward input behavior where users typed over top of existing input. The plugin acted like a word processor Insert mode. This has always agrivated me, so now the input shifts on input and backspace/delete. * Now calling .change() on blur if the value has changed since the plugin prevents the change event from being fired naturally. * Pasting incomplete test no longer wipes the input. Instead, the cursor is just placed where the input leaves off. * Fixed backspace detection for iPhone. Plugin is now iPhone compatible. * Fixed pasting bug when mask starts with a literal and caret position is on the literal character. I feel really good about this release. I made some changes that I feel are good for the direction of the plugin. Iif you don't like some of the changes please let me know and I'll look at adding them back in as options. I'm trying hard not to bloat things up, but I don't want to remove features that are needed. Merry Christmas! Josh digitalbush.com
[jQuery] Re: attributes setting appending rather than clearing
Not sure the best way to do this, but this might work jQuery(function(){ var anotherFunction() { // your thing } var myFunction() { // do something $(this).bind('click', anotherFunction); $(this).unbind('click', myFunction); } $('a').bind('click', myFunction); }); On Dec 22, 5:59 am, alextait alext...@gmail.com wrote: I am setting the click attribute of an anchor tag using query on the document ready event. Once the user has clicked on this link I am attempting to change the click event to call another method than the one initialy setup. Instead of replacing the old method is simply appends the new method so that both methods are called . any help would be great ! thanks
[jQuery] Re: Superfish - Nav-bar style with bgIframe?
I hate to bump, but it's been a week and I'm really at a loss here. If anyone could simply bounce a couple vague suggestions off me, it'd be great.
[jQuery] Re: Bizarre rendering issue (FF 3, IE 6)
jared, your website is supernice and promising, but i for one don't understand anything about your problem description. i think either you're lacking sleep or you wrote too fast :) Can you rephrase please, for people that don't yet know your website internals (or lack sleep themselves ) ?can you also enable logging (i have firebug) on the page online, because the console doesn't show anything here. Thanks alexandre On Mon, Dec 22, 2008 at 2:08 PM, userdude farri...@gmail.com wrote: I am having an issue with the following jQuery code: http://www.houseofoverlord.com/c/jeniffer/bhive/test2.html http://www.houseofoverlord.com/c/jeniffer/bhive/test2.html The rendering that is not occurring is when the page: * Loads * When clicking the main (horizontal) menu items What is supposed to happen is the default (first) navsecondary a tag is supposed to receive a current class designation. If I console.log, everything seems fine, but the screen display does not show the change, and the HTML view in Firefox does not demonstrate the update (class=current). If you click on about us and then click on what we do, that behavior is supposed to happen automatically when clicking the about us menu link. Anybody know what's going on? Thanks! Jared -- View this message in context: http://www.nabble.com/Bizarre-rendering-issue-%28FF-3%2C-IE-6%29-tp21127522s27240p21127522.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Masked Input Plugin 1.2.1 Released
Josh, these are very cool additions, love the New mask syntax option '?' and the improved usability. Thanks for your hard work! just noticed in the demo that if i don't fill the input completely and go to another input, it removes the entered value entirely as soon as the input loses focus. That's a bit harsh. Maybe that's where a validation should take over and paint the input red so that the user realizes he didn't completely filled in the content. On Mon, Dec 22, 2008 at 3:39 PM, Josh Bush josh.b...@gmail.com wrote: There is now a new version of my Masked Input Plugin ( http://digitalbush.com/projects/masked-input-plugin/ ) for jQuery. Version 1.2.1 moves one step closer to my bigger picture for the plugin. I had to make a few breaking changes to do so, but I feel that the end result is worth it. This release adds a lot more polish to the 1.2 release. Here's what we've got. * BREAKING CHANGE: Removed deprecated $.mask.addPlaceholder method. Use the $.mask.definitions['']=; syntax instead. I said I was going to do this on the last release and now seems just as good a time as any. * BREAKING CHANGE: Removed allowPartial option in favor of new mask syntax I'll describe below. A discussion and code exchange with Michael Bray inspired this change. I hate that it's a breaking change, but the new way makes a lot more sense. * New mask syntax option '?'. Anything listed after '?' within the mask is considered optional user input. The common example for this is phone number + optional extension. The new syntax will look like this: (999) 999-? x9 * I got rid of the awkward input behavior where users typed over top of existing input. The plugin acted like a word processor Insert mode. This has always agrivated me, so now the input shifts on input and backspace/delete. * Now calling .change() on blur if the value has changed since the plugin prevents the change event from being fired naturally. * Pasting incomplete test no longer wipes the input. Instead, the cursor is just placed where the input leaves off. * Fixed backspace detection for iPhone. Plugin is now iPhone compatible. * Fixed pasting bug when mask starts with a literal and caret position is on the literal character. I feel really good about this release. I made some changes that I feel are good for the direction of the plugin. Iif you don't like some of the changes please let me know and I'll look at adding them back in as options. I'm trying hard not to bloat things up, but I don't want to remove features that are needed. Merry Christmas! Josh digitalbush.com
[jQuery] Re: submit a form with a link
Try this: $(#submit).click(function() { $(#myForm).submit(); }); a id=submit href=#Submit/a Jörn On Mon, Dec 22, 2008 at 2:16 PM, sole szub...@gmail.com wrote: Hello! I'm using jquery to validate a form and that I'm using this link to to the submit: a href=javascript:void(0); onclick=document.form.submit(); Submit /a The problem is that this kind of submit doesn't activate the jquery validation. How can I do to force the validation? Thanks!! Sole
[jQuery] Please help me to find my mistakes on below code
Hi, I am trying to solve ajaxStart and ajaxStop issue from last 3 days but can not solve...can somebody tell me what's my mistake here. I want to show a loader image for different DOM element ids on different ajax request. Problem is that when I am calling an ajax request on one form submission then not only it's corresponding but also other loader image is showing, while only one loader image must be show. Here is my code: First Block code - script $(document).ready(function(){ $(form#submit).submit(function() { $.ajax({ type: POST, url: test1.php, success: function(del){ $('div.success').fadeIn(); } }); jQuery('#id_fav_loading').ajaxStart(function() { jQuery('#id_fav_loading').show(); }).ajaxStop (function() { jQuery('#id_fav_loading').hide();; }); return false; }); }); /script div class=container form id=submit method=post label for=lnameClient Last Name:/label input id=lname class=text name=lname size=20 type=text / button class=button positive img src=../images/icons/ tick.png alt= / Add Client /button /form div style=display:none; id=id_fav_loading img src=loader.gif / /div div class=success style=display:none; Client has been added successfully. /div /div - Second block code --- script $(document).ready(function(){ $(form#submit1).submit(function() { $.ajax({ type: POST, url: test1.php, success: function(del){ $('div.success1').fadeIn(); } }); jQuery('#id_fav_loading1').ajaxStart(function() { jQuery('#id_fav_loading1').show(); }).ajaxStop (function() { jQuery('#id_fav_loading1').hide();; }); return false; }); }); /script div class=container form id=submit1 method=post label for=lnameClient Last Name:/label input id=lname class=text name=lname size=20 type=text / button class=button positive img src=../images/icons/ tick.png alt= / Add Server /button /form div style=display:none; id=id_fav_loading1 img src=loader.gif / /div div class=success1 style=display:none; Server has been added successfully. /div /div If I clicks on Add Client then image for add client and add server is displaying while only add client block loader image must be display. Please help me to come out this problem. Thanks
[jQuery] Re: Masked Input Plugin 1.2.1 Released
I second that! An option to make the plugin more tolerant, especially in combination with other forms of validation, would be perfect. Other changes all sounds fine. The fix for users typed over existing input will be much appreciated. Thanks Jörn On Mon, Dec 22, 2008 at 3:59 PM, Alexandre Plennevaux aplennev...@gmail.com wrote: Josh, these are very cool additions, love the New mask syntax option '?' and the improved usability. Thanks for your hard work! just noticed in the demo that if i don't fill the input completely and go to another input, it removes the entered value entirely as soon as the input loses focus. That's a bit harsh. Maybe that's where a validation should take over and paint the input red so that the user realizes he didn't completely filled in the content. On Mon, Dec 22, 2008 at 3:39 PM, Josh Bush josh.b...@gmail.com wrote: There is now a new version of my Masked Input Plugin ( http://digitalbush.com/projects/masked-input-plugin/ ) for jQuery. Version 1.2.1 moves one step closer to my bigger picture for the plugin. I had to make a few breaking changes to do so, but I feel that the end result is worth it. This release adds a lot more polish to the 1.2 release. Here's what we've got. * BREAKING CHANGE: Removed deprecated $.mask.addPlaceholder method. Use the $.mask.definitions['']=; syntax instead. I said I was going to do this on the last release and now seems just as good a time as any. * BREAKING CHANGE: Removed allowPartial option in favor of new mask syntax I'll describe below. A discussion and code exchange with Michael Bray inspired this change. I hate that it's a breaking change, but the new way makes a lot more sense. * New mask syntax option '?'. Anything listed after '?' within the mask is considered optional user input. The common example for this is phone number + optional extension. The new syntax will look like this: (999) 999-? x9 * I got rid of the awkward input behavior where users typed over top of existing input. The plugin acted like a word processor Insert mode. This has always agrivated me, so now the input shifts on input and backspace/delete. * Now calling .change() on blur if the value has changed since the plugin prevents the change event from being fired naturally. * Pasting incomplete test no longer wipes the input. Instead, the cursor is just placed where the input leaves off. * Fixed backspace detection for iPhone. Plugin is now iPhone compatible. * Fixed pasting bug when mask starts with a literal and caret position is on the literal character. I feel really good about this release. I made some changes that I feel are good for the direction of the plugin. Iif you don't like some of the changes please let me know and I'll look at adding them back in as options. I'm trying hard not to bloat things up, but I don't want to remove features that are needed. Merry Christmas! Josh digitalbush.com
[jQuery] Re: Bizarre rendering issue (FF 3, IE 6)
Hi Alexandre, Thank you for the reply. I'm not sure what you mean by enable debugging in Firebug. Basically, the first submenu item for specific menu item should always default to having the current class. Although I can tell that something is occurring using console.log to inspect the a-link addClass method, the actual html for the page rendering is not applying; I effectively cannot see the results of the addClass method that is run if I am doing an addClass method during only the main menu selections. The best way to see what I mean is to: * first, click the about us link. * then, click the what we do link The what we do link should be highlighted just like after the second click when clicking on the about us link. As far as I can tell, addClass is running, but the page is not actually rendering the change, and Firebug is not showing the class in the HTML inspector. Right-click on the what we do link, select Inspect Element, then click on the about us link. See the current goes away? It should stay, and I can't figure out why it's not working. Thanks! Jared Alexandre Plennevaux-2 wrote: jared, your website is supernice and promising, but i for one don't understand anything about your problem description. i think either you're lacking sleep or you wrote too fast :) Can you rephrase please, for people that don't yet know your website internals (or lack sleep themselves ) ?can you also enable logging (i have firebug) on the page online, because the console doesn't show anything here. Thanks alexandre On Mon, Dec 22, 2008 at 2:08 PM, userdude farri...@gmail.com wrote: I am having an issue with the following jQuery code: http://www.houseofoverlord.com/c/jeniffer/bhive/test2.html http://www.houseofoverlord.com/c/jeniffer/bhive/test2.html The rendering that is not occurring is when the page: * Loads * When clicking the main (horizontal) menu items What is supposed to happen is the default (first) navsecondary a tag is supposed to receive a current class designation. If I console.log, everything seems fine, but the screen display does not show the change, and the HTML view in Firefox does not demonstrate the update (class=current). If you click on about us and then click on what we do, that behavior is supposed to happen automatically when clicking the about us menu link. Anybody know what's going on? Thanks! Jared -- View this message in context: http://www.nabble.com/Bizarre-rendering-issue-%28FF-3%2C-IE-6%29-tp21127522s27240p21127522.html Sent from the jQuery General Discussion mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Bizarre-rendering-issue-%28FF-3%2C-IE-6%29-tp21127522s27240p21129366.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Masked Input Plugin 1.2.1 Released
Thank you Jörn and Alexandre for your feedback. I'm thinking that maybe I should just provide a hook that gets called when the plugin detects invalid input. I could just provide a default function that blanks the input as it is today, but would let the user decide what to do there. Any ideas on how I can make my plugin more extensible are more than welcome. Josh On Dec 22, 9:08 am, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: I second that! An option to make the plugin more tolerant, especially in combination with other forms of validation, would be perfect. Other changes all sounds fine. The fix for users typed over existing input will be much appreciated. Thanks Jörn On Mon, Dec 22, 2008 at 3:59 PM, Alexandre Plennevaux aplennev...@gmail.com wrote: Josh, these are very cool additions, love the New mask syntax option '?' and the improved usability. Thanks for your hard work! just noticed in the demo that if i don't fill the input completely and go to another input, it removes the entered value entirely as soon as the input loses focus. That's a bit harsh. Maybe that's where a validation should take over and paint the input red so that the user realizes he didn't completely filled in the content. On Mon, Dec 22, 2008 at 3:39 PM, Josh Bush josh.b...@gmail.com wrote: There is now a new version of my Masked Input Plugin ( http://digitalbush.com/projects/masked-input-plugin/) for jQuery. Version 1.2.1 moves one step closer to my bigger picture for the plugin. I had to make a few breaking changes to do so, but I feel that the end result is worth it. This release adds a lot more polish to the 1.2 release. Here's what we've got. * BREAKING CHANGE: Removed deprecated $.mask.addPlaceholder method. Use the $.mask.definitions['']=; syntax instead. I said I was going to do this on the last release and now seems just as good a time as any. * BREAKING CHANGE: Removed allowPartial option in favor of new mask syntax I'll describe below. A discussion and code exchange with Michael Bray inspired this change. I hate that it's a breaking change, but the new way makes a lot more sense. * New mask syntax option '?'. Anything listed after '?' within the mask is considered optional user input. The common example for this is phone number + optional extension. The new syntax will look like this: (999) 999-? x9 * I got rid of the awkward input behavior where users typed over top of existing input. The plugin acted like a word processor Insert mode. This has always agrivated me, so now the input shifts on input and backspace/delete. * Now calling .change() on blur if the value has changed since the plugin prevents the change event from being fired naturally. * Pasting incomplete test no longer wipes the input. Instead, the cursor is just placed where the input leaves off. * Fixed backspace detection for iPhone. Plugin is now iPhone compatible. * Fixed pasting bug when mask starts with a literal and caret position is on the literal character. I feel really good about this release. I made some changes that I feel are good for the direction of the plugin. Iif you don't like some of the changes please let me know and I'll look at adding them back in as options. I'm trying hard not to bloat things up, but I don't want to remove features that are needed. Merry Christmas! Josh digitalbush.com
[jQuery] Re: Bizarre rendering issue (FF 3, IE 6)
Well, in the following example (another iteration of the same menu), the behavior works: http://www.houseofoverlord.com/c/jeniffer/bhive/test3.html http://www.houseofoverlord.com/c/jeniffer/bhive/test3.html You have to click on the about us link and then scroll down until the header for that section is at the top (to activate the new menu style). See the what we do link is already highlighted? Why it does not work on the other, is what I am after. userdude wrote: Hi Alexandre, Thank you for the reply. I'm not sure what you mean by enable debugging in Firebug. Basically, the first submenu item for specific menu item should always default to having the current class. Although I can tell that something is occurring using console.log to inspect the a-link addClass method, the actual html for the page rendering is not applying; I effectively cannot see the results of the addClass method that is run if I am doing an addClass method during only the main menu selections. The best way to see what I mean is to: * first, click the about us link. * then, click the what we do link The what we do link should be highlighted just like after the second click when clicking on the about us link. As far as I can tell, addClass is running, but the page is not actually rendering the change, and Firebug is not showing the class in the HTML inspector. Right-click on the what we do link, select Inspect Element, then click on the about us link. See the current goes away? It should stay, and I can't figure out why it's not working. Thanks! Jared Alexandre Plennevaux-2 wrote: jared, your website is supernice and promising, but i for one don't understand anything about your problem description. i think either you're lacking sleep or you wrote too fast :) Can you rephrase please, for people that don't yet know your website internals (or lack sleep themselves ) ?can you also enable logging (i have firebug) on the page online, because the console doesn't show anything here. Thanks alexandre On Mon, Dec 22, 2008 at 2:08 PM, userdude farri...@gmail.com wrote: I am having an issue with the following jQuery code: http://www.houseofoverlord.com/c/jeniffer/bhive/test2.html http://www.houseofoverlord.com/c/jeniffer/bhive/test2.html The rendering that is not occurring is when the page: * Loads * When clicking the main (horizontal) menu items What is supposed to happen is the default (first) navsecondary a tag is supposed to receive a current class designation. If I console.log, everything seems fine, but the screen display does not show the change, and the HTML view in Firefox does not demonstrate the update (class=current). If you click on about us and then click on what we do, that behavior is supposed to happen automatically when clicking the about us menu link. Anybody know what's going on? Thanks! Jared -- View this message in context: http://www.nabble.com/Bizarre-rendering-issue-%28FF-3%2C-IE-6%29-tp21127522s27240p21127522.html Sent from the jQuery General Discussion mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Bizarre-rendering-issue-%28FF-3%2C-IE-6%29-tp21127522s27240p21129602.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] How to trigger an event for a SELECT after removing an entry??
Hi Gurus I have a generated dropdown list with years and an onChange event. Sometimes the select field has a value '(All)' as first entry. I want to remove this entry and trigger the DOM Level 0 Event. This would be my page: head script type=text/javascript src=jquery.js/script script language=JavaScript type=text/javascript $(function() { //works but cant trigger event for select $('option:contains(Alle)').remove(); // should be something like this, but this doesnt work $('select:has(option:contains(All))').filter('option:contains (All)').remove().end().trigger('change'); }); /script /head body form id=form1 name=form1 method=post action= select id=PG1_ZEPLNZPJ_V01 class=urDdlWhl1 urV onchange=alert ('clicked') name=PG1_ZEPLNZPJ_V01 ct=DropDownListBox option selected= value=(All)/option option value=00012008/option option value=00022009/option option value=00032010/option option value=00042011/option option value=00052012/option option value=00062013/option option value=00072014/option /select /form /body /html Really ned some hints here :-) thanks guys ggerri
[jQuery] Re: Bizarre rendering issue (FF 3, IE 6)
ok, i got it, well, at least the problem. now, i'm not sure about how to solve it. 1/ maybe it's a css issue. in your stylesheet, try changing this #aboutus .nav .navmain a.current, #aboutus .nav .navsecondary a.current { color: #a5ee26; } #aboutus .nav ul.navsecondary { left: 130px; top: 115px; } #aboutus .nav .navsecondary a { color: #c87eeb; } into #aboutus .nav ul.navsecondary { left: 130px; top: 115px; } #aboutus .nav .navsecondary a { color: #c87eeb; } #aboutus .nav .navmain a.current, #aboutus .nav .navsecondary a.current { color: #a5ee26; } 2./ i noticed you use the function doShowStorywrap(c) sometimes passing it a jquery object, sometimes just this. The case in which the rendering does not happen is when you don't use a jquery object, so i would try that, see if that changes anything. On Mon, Dec 22, 2008 at 4:10 PM, userdude farri...@gmail.com wrote: Hi Alexandre, Thank you for the reply. I'm not sure what you mean by enable debugging in Firebug. Basically, the first submenu item for specific menu item should always default to having the current class. Although I can tell that something is occurring using console.log to inspect the a-link addClass method, the actual html for the page rendering is not applying; I effectively cannot see the results of the addClass method that is run if I am doing an addClass method during only the main menu selections. The best way to see what I mean is to: * first, click the about us link. * then, click the what we do link The what we do link should be highlighted just like after the second click when clicking on the about us link. As far as I can tell, addClass is running, but the page is not actually rendering the change, and Firebug is not showing the class in the HTML inspector. Right-click on the what we do link, select Inspect Element, then click on the about us link. See the current goes away? It should stay, and I can't figure out why it's not working. Thanks! Jared Alexandre Plennevaux-2 wrote: jared, your website is supernice and promising, but i for one don't understand anything about your problem description. i think either you're lacking sleep or you wrote too fast :) Can you rephrase please, for people that don't yet know your website internals (or lack sleep themselves ) ?can you also enable logging (i have firebug) on the page online, because the console doesn't show anything here. Thanks alexandre On Mon, Dec 22, 2008 at 2:08 PM, userdude farri...@gmail.com wrote: I am having an issue with the following jQuery code: http://www.houseofoverlord.com/c/jeniffer/bhive/test2.html http://www.houseofoverlord.com/c/jeniffer/bhive/test2.html The rendering that is not occurring is when the page: * Loads * When clicking the main (horizontal) menu items What is supposed to happen is the default (first) navsecondary a tag is supposed to receive a current class designation. If I console.log, everything seems fine, but the screen display does not show the change, and the HTML view in Firefox does not demonstrate the update (class=current). If you click on about us and then click on what we do, that behavior is supposed to happen automatically when clicking the about us menu link. Anybody know what's going on? Thanks! Jared -- View this message in context: http://www.nabble.com/Bizarre-rendering-issue-%28FF-3%2C-IE-6%29-tp21127522s27240p21127522.html Sent from the jQuery General Discussion mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Bizarre-rendering-issue-%28FF-3%2C-IE-6%29-tp21127522s27240p21129366.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] insert div into group ordered by ID..
I'm a relative newbie with jQuery and have read the doc about DOM manipulation but am too dense to answer this question: I have a series of DIVs in order by ID. I would like to insert a new DIV into its proper place in the order... Given the following: div div id=alpha/div div id=beta/div div id=gamma/div div id=epsilon/div /div How would I be able to insert the following div in its correct spot (between gamma and epsilon)? div id=alpha/div Thanks in advance!
[jQuery] Re: Masked Input Plugin 1.2.1 Released
i think personally that indeed a callback onError, that is called when the input loses focus would be great. from thereon, the user can defines what to do. for instance, as a UI developer, i would add a error class to the wrapping div, and add Incomplete data message to the right of the input. But another would go as far as alert(missing data you moron !!) . At least my desk neighbour would, he's so uneducated :) On Mon, Dec 22, 2008 at 4:25 PM, Josh Bush josh.b...@gmail.com wrote: Thank you Jörn and Alexandre for your feedback. I'm thinking that maybe I should just provide a hook that gets called when the plugin detects invalid input. I could just provide a default function that blanks the input as it is today, but would let the user decide what to do there. Any ideas on how I can make my plugin more extensible are more than welcome. Josh On Dec 22, 9:08 am, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: I second that! An option to make the plugin more tolerant, especially in combination with other forms of validation, would be perfect. Other changes all sounds fine. The fix for users typed over existing input will be much appreciated. Thanks Jörn On Mon, Dec 22, 2008 at 3:59 PM, Alexandre Plennevaux aplennev...@gmail.com wrote: Josh, these are very cool additions, love the New mask syntax option '?' and the improved usability. Thanks for your hard work! just noticed in the demo that if i don't fill the input completely and go to another input, it removes the entered value entirely as soon as the input loses focus. That's a bit harsh. Maybe that's where a validation should take over and paint the input red so that the user realizes he didn't completely filled in the content. On Mon, Dec 22, 2008 at 3:39 PM, Josh Bush josh.b...@gmail.com wrote: There is now a new version of my Masked Input Plugin ( http://digitalbush.com/projects/masked-input-plugin/) for jQuery. Version 1.2.1 moves one step closer to my bigger picture for the plugin. I had to make a few breaking changes to do so, but I feel that the end result is worth it. This release adds a lot more polish to the 1.2 release. Here's what we've got. * BREAKING CHANGE: Removed deprecated $.mask.addPlaceholder method. Use the $.mask.definitions['']=; syntax instead. I said I was going to do this on the last release and now seems just as good a time as any. * BREAKING CHANGE: Removed allowPartial option in favor of new mask syntax I'll describe below. A discussion and code exchange with Michael Bray inspired this change. I hate that it's a breaking change, but the new way makes a lot more sense. * New mask syntax option '?'. Anything listed after '?' within the mask is considered optional user input. The common example for this is phone number + optional extension. The new syntax will look like this: (999) 999-? x9 * I got rid of the awkward input behavior where users typed over top of existing input. The plugin acted like a word processor Insert mode. This has always agrivated me, so now the input shifts on input and backspace/delete. * Now calling .change() on blur if the value has changed since the plugin prevents the change event from being fired naturally. * Pasting incomplete test no longer wipes the input. Instead, the cursor is just placed where the input leaves off. * Fixed backspace detection for iPhone. Plugin is now iPhone compatible. * Fixed pasting bug when mask starts with a literal and caret position is on the literal character. I feel really good about this release. I made some changes that I feel are good for the direction of the plugin. Iif you don't like some of the changes please let me know and I'll look at adding them back in as options. I'm trying hard not to bloat things up, but I don't want to remove features that are needed. Merry Christmas! Josh digitalbush.com
[jQuery] Re: Bizarre rendering issue (FF 3, IE 6)
Something tells me jQuery is acting up in some way that means the class is never applied, like an event never completes successfully. It's just very strange it doesn't work, especially since the test3.html link code does work, and I don't think I did anything to make the code interpret differently. But you are right, it is when the object is a jQuery object instead of an element object. Alexandre Plennevaux-2 wrote: ok, i got it, well, at least the problem. now, i'm not sure about how to solve it. 1/ maybe it's a css issue. in your stylesheet, try changing this #aboutus .nav .navmain a.current, #aboutus .nav .navsecondary a.current { color: #a5ee26; } #aboutus .nav ul.navsecondary { left: 130px; top: 115px; } #aboutus .nav .navsecondary a { color: #c87eeb; } into #aboutus .nav ul.navsecondary { left: 130px; top: 115px; } #aboutus .nav .navsecondary a { color: #c87eeb; } #aboutus .nav .navmain a.current, #aboutus .nav .navsecondary a.current { color: #a5ee26; } 2./ i noticed you use the function doShowStorywrap(c) sometimes passing it a jquery object, sometimes just this. The case in which the rendering does not happen is when you don't use a jquery object, so i would try that, see if that changes anything. On Mon, Dec 22, 2008 at 4:10 PM, userdude farri...@gmail.com wrote: Hi Alexandre, Thank you for the reply. I'm not sure what you mean by enable debugging in Firebug. Basically, the first submenu item for specific menu item should always default to having the current class. Although I can tell that something is occurring using console.log to inspect the a-link addClass method, the actual html for the page rendering is not applying; I effectively cannot see the results of the addClass method that is run if I am doing an addClass method during only the main menu selections. The best way to see what I mean is to: * first, click the about us link. * then, click the what we do link The what we do link should be highlighted just like after the second click when clicking on the about us link. As far as I can tell, addClass is running, but the page is not actually rendering the change, and Firebug is not showing the class in the HTML inspector. Right-click on the what we do link, select Inspect Element, then click on the about us link. See the current goes away? It should stay, and I can't figure out why it's not working. Thanks! Jared Alexandre Plennevaux-2 wrote: jared, your website is supernice and promising, but i for one don't understand anything about your problem description. i think either you're lacking sleep or you wrote too fast :) Can you rephrase please, for people that don't yet know your website internals (or lack sleep themselves ) ?can you also enable logging (i have firebug) on the page online, because the console doesn't show anything here. Thanks alexandre On Mon, Dec 22, 2008 at 2:08 PM, userdude farri...@gmail.com wrote: I am having an issue with the following jQuery code: http://www.houseofoverlord.com/c/jeniffer/bhive/test2.html http://www.houseofoverlord.com/c/jeniffer/bhive/test2.html The rendering that is not occurring is when the page: * Loads * When clicking the main (horizontal) menu items What is supposed to happen is the default (first) navsecondary a tag is supposed to receive a current class designation. If I console.log, everything seems fine, but the screen display does not show the change, and the HTML view in Firefox does not demonstrate the update (class=current). If you click on about us and then click on what we do, that behavior is supposed to happen automatically when clicking the about us menu link. Anybody know what's going on? Thanks! Jared -- View this message in context: http://www.nabble.com/Bizarre-rendering-issue-%28FF-3%2C-IE-6%29-tp21127522s27240p21127522.html Sent from the jQuery General Discussion mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Bizarre-rendering-issue-%28FF-3%2C-IE-6%29-tp21127522s27240p21129366.html Sent from the jQuery General Discussion mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Bizarre-rendering-issue-%28FF-3%2C-IE-6%29-tp21127522s27240p21130096.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Superfish - Nav-bar style with bgIframe?
The initiation: $(document).ready(function(){ $(ul#sf-menu-id).superfish({ autoArrows: false, pathClass: 'current' }).find('ul').bgIframe(); }); Try changing your document.ready statement to this: $(document).ready(function(){ $(ul#sf-menu).superfish().find('ul').bgIframe({opacity:false}); });
[jQuery] Re: submit a form with a link
I'm using jquery to validate a form and that I'm using this link to to the submit: a href=javascript:void(0); onclick=document.form.submit(); Submit /a This will not work because you are calling the submit method for the form, not any validation script... Also, is there any reason you are using the onclick event handler? The problem is that this kind of submit doesn't activate the jquery validation. How can I do to force the validation? Please provide more of your code so we can see exactly what you are trying to accomplish...
[jQuery] Re: submit a form with a link
Thanks Jörn!! It works! But I continue with a problem because the link Submit has to validate that only input1 of the form is not empty. And the submit button validates that the three inputs are no empty. So I think that I will have two validations for the same form. How can I do that? I have a form with 3 inputs: form id=form1 method=post input type=text id=input1 input type=text id=input2 input type=text id=input3 input type=submit value=Submit button name=Submit a id=submit href=#Submit link/a /form Thanks again! Sole
[jQuery] Re: Browser Hangs while hiding 2K+ table rows
Cam, I'm hiding all rows only in anticipation of showing the higher levels of the tree that is represented by this table. Each row has a class associated with it that indicates the level which simply has a left-margin css value associated with it giving the appearance of subordination in the tree. Essentially, I hide all relevant rows, then show rows with classes leveln where n is incremented in a loop, so if I select to show only the first 3 levels, I hide all, show level1, level2, and level3, leaving the rest hidden. There may be a better way to do it, but that's what I came up with. As for hiding the tbody, that does not allow me to then show the rows that I want to be visible, because their parent element is hidden. Eric On Dec 18, 2:39 pm, Cam Spiers camspi...@gmail.com wrote: If you are trying to hide allrows would it be possible to hide either the table or the tbody? On Fri, Dec 19, 2008 at 7:28 AM, RickyBerg bergbra...@gmail.com wrote: I've been converting a legacy web app to use JQuery. I've now cleaned it up so that my HTML validates and I have instrumented the code with classes and id's as appropriate. This app is essentially a table that displays the status of jobs for Autosys. The problem that I'm having is that when I hide the entire list, the browser hangs for several minutes. There are sometimes over 2000 rows. I have cached the full resultset into a variable, though I'm not sure how helpful this is. In the code below, the initial setting of $allRows doesn't take much time at all, but when I hit the hide() line, the browser hangs for wy too long. interestingly, if I comment out the hide() command, and then manually issue a comand like $allRows.css(color, red); it works in a very reasonable amount of time. $(function() { $allRows = $(tbodytr); $allRows.hide(); } Also, if I let it run once to completion and all of the rows are hidden, then I can show() them and hide() them in reasonable time. Is it something with my selector? Thanks, folks. Eric
[jQuery] Re: submit a form with a link
I have a form with 3 inputs: form id=form1 method=post input type=text id=input1 input type=text id=input2 input type=text id=input3 input type=submit value=Submit button name=Submit a id=submit href=#Submit link/a /form First off, why do you have an submit button and a submit link? Second, what are you using to validate the form?
[jQuery] remove ID
Is it possible to remove an ID from an element with Jquery or javascript for that matter? I've searched and all I can find is how to remove the whole element, I just want to remove the ID.Thanks Mike
[jQuery] Re: how to display ads after page load
If the scripts are meant to be put inline and use document.write, there is nothing you can do. Otherwise just stick them at the bottom of the code, just before the closing /body tag. On Dec 22, 10:03 am, mohan itmohan2...@gmail.com wrote: Hi, In my application, I have some ads which are from other sites. They gave us the Javascript to display their ads. Its taking time to load the entire page, because of their ads. So I am trying to load their script after loading the page. How can i do this? Can anyone help me. Thanks, Mohan
[jQuery] Re: submit a form with a link
Hi, my english is not good enough, I hope I can explain it to you!!! I`m using this to validate: $(document).ready(function() { var validator = $(#form1).bind(invalid-form.validate, function() { $(#summary).html(trtd aling='right' width='2%' class='ico'img src='warning.gif' width='16' height='15' //td+ td width='98%' valign='top' aling='center' class='err_validation'+ t1taglib:PrintMsg msgcode=RECOVERABLE_ERROR_MSG //td/tr); }).validate({ rules: { errorContainer: $(#summary), input1: required, input2: required, input3: required } }); }); I have the submit button to validate that the 3 inputs are complete and redirect to page1.jsp, and the submit link that checks that only input1 is complete to opens a pop-up window. Thank! Sole.
[jQuery] $.load() Redirected
I have read a similar post to this, but I think my situation is a bit different. I have a link like this: a href=/my-url.html rel=the-div class=modal-linkLink/a Then in my JS I use load something like this: $('#modal-content').load('/my-url.html #the-div'); Which loads 'the-div' into a modal window on the page that called it. It works perfectly. But if I decide that on '/my-url.html' requires you to be logged in, and redirect you to login.html, nothing shows up in my modal window. This is expected, since '/my-url.html #the-div' does not exists. But I want to give the user a meaningful error message. I can detect that '/my-url.html #the-div' isn't there, and make a generic error, but I want to know if the page redirected. I don't want to follow the redirect, just know that it happened, so I can give proper feedback. Right now, all I seem to have to work with is the resposeText of what did come back. In there is a DOM element with an ID of #login, but that might not be the case some time in the future. What I really want to know is the URI of the page that produced the reponseText. It is no longer 'my-url.html', but instead 'login.html. But this does not appear anywhere in the responseHeaders that I can see. Any thoughts?
[jQuery] Re: How to trigger an event for a SELECT after removing an entry??
Change the value of the dropdown with .val('0001') - maybe before removing the first option. Or use triggerHandler but inline events won't fire that way, I guess. On Dec 22, 4:37 pm, ggerri a...@ggerri.com wrote: Hi Gurus I have a generated dropdown list with years and an onChange event. Sometimes the select field has a value '(All)' as first entry. I want to remove this entry and trigger the DOM Level 0 Event. This would be my page: head script type=text/javascript src=jquery.js/script script language=JavaScript type=text/javascript $(function() { //works but cant trigger event for select $('option:contains(Alle)').remove(); // should be something like this, but this doesnt work $('select:has(option:contains(All))').filter('option:contains (All)').remove().end().trigger('change'); }); /script /head body form id=form1 name=form1 method=post action= select id=PG1_ZEPLNZPJ_V01 class=urDdlWhl1 urV onchange=alert ('clicked') name=PG1_ZEPLNZPJ_V01 ct=DropDownListBox option selected= value=(All)/option option value=00012008/option option value=00022009/option option value=00032010/option option value=00042011/option option value=00052012/option option value=00062013/option option value=00072014/option /select /form /body /html Really ned some hints here :-) thanks guys ggerri
[jQuery] Re: table sorter issue, how do i sort these as a currency
I'm still trying to get this working, has anybody tried anything like this before? On Dec 15, 6:16 pm, livewire9174 markmch...@gmail.com wrote: here is the code, I need to stop the execution somewhere I guess ? I am using ajax calls to put data into to table, so I guess I cant attach the tablesorter script until the ajax calls have fully finished ? [code] !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; ?php header(Expires: Mon, 26 Jul 1997 05:00:00 GMT); // always modified header(Last-Modified: . gmdate(D, d M Y H:i:s) . GMT); // HTTP/1.1 header(Cache-Control: no-store, no-cache, must-revalidate); header(Cache-Control: post-check=0, pre-check=0, false); header(Cache-Control: public); // HTTP/1.0 header(Pragma: no-cache); session_start(); ? head title/title script type=text/javascript src=jquery-latest.js/script script type=text/javascript function ajaxFunction() { var xmlHttp=null; try { // Firefox, Opera 8.0+, Safari xmlHttp=new XMLHttpRequest(); xmlHttp1=new XMLHttpRequest(); xmlHttp2=new XMLHttpRequest(); xmlHttp3=new XMLHttpRequest(); xmlHttp4=new XMLHttpRequest(); xmlHttp5=new XMLHttpRequest(); xmlHttp6=new XMLHttpRequest(); xmlHttp7=new XMLHttpRequest(); xmlHttp8=new XMLHttpRequest(); } catch (e) { // Internet Explorer try { xmlHttp=new ActiveXObject(Msxml2.XMLHTTP); xmlHttp1=new ActiveXObject(Msxml2.XMLHTTP); xmlHttp2=new ActiveXObject(Msxml2.XMLHTTP); xmlHttp3=new ActiveXObject(Msxml2.XMLHTTP); xmlHttp4=new ActiveXObject(Msxml2.XMLHTTP); xmlHttp5=new ActiveXObject(Msxml2.XMLHTTP); xmlHttp6=new ActiveXObject(Msxml2.XMLHTTP); xmlHttp7=new ActiveXObject(Msxml2.XMLHTTP); xmlHttp8=new ActiveXObject(Msxml2.XMLHTTP); } catch (e) { try { xmlHttp=new ActiveXObject(Microsoft.XMLHTTP); xmlHttp1=new ActiveXObject(Microsoft.XMLHTTP); xmlHttp2=new ActiveXObject(Microsoft.XMLHTTP); xmlHttp3=new ActiveXObject(Microsoft.XMLHTTP); xmlHttp4=new ActiveXObject(Microsoft.XMLHTTP); xmlHttp5=new ActiveXObject(Microsoft.XMLHTTP); xmlHttp6=new ActiveXObject(Microsoft.XMLHTTP); xmlHttp7=new ActiveXObject(Microsoft.XMLHTTP); xmlHttp8=new ActiveXObject(Microsoft.XMLHTTP); } catch (e) { alert(Your browser does not support AJAX!); return false; } } } xmlHttp.onreadystatechange=function() { if(xmlHttp.readyState==4) { document.getElementById('resulta').innerHTML = xmlHttp.responseText; document.getElementById('showMessagea').style.display='none'; } } xmlHttp1.onreadystatechange=function() { if(xmlHttp1.readyState==4) { document.getElementById('resultb').innerHTML = xmlHttp1.responseText; document.getElementById('showMessageb').style.display='none'; } } xmlHttp2.onreadystatechange=function() { if(xmlHttp2.readyState==4) { document.getElementById('resultc').innerHTML = xmlHttp2.responseText; document.getElementById('showMessagec').style.display='none'; } } xmlHttp3.onreadystatechange=function() { if(xmlHttp3.readyState==4) { document.getElementById('resultd').innerHTML = xmlHttp3.responseText; document.getElementById('showMessaged').style.display='none'; } } xmlHttp4.onreadystatechange=function() { if(xmlHttp4.readyState==4) { document.getElementById('resulte').innerHTML = xmlHttp4.responseText; document.getElementById('showMessagee').style.display='none'; } } xmlHttp5.onreadystatechange=function() { if(xmlHttp5.readyState==4) { document.getElementById('resultf').innerHTML = xmlHttp5.responseText; document.getElementById('showMessagef').style.display='none'; } } xmlHttp6.onreadystatechange=function() { if(xmlHttp6.readyState==4) { document.getElementById('resultg').innerHTML = xmlHttp6.responseText; document.getElementById('showMessageg').style.display='none'; } } xmlHttp7.onreadystatechange=function() { if(xmlHttp7.readyState==4) { document.getElementById('resulth').innerHTML = xmlHttp7.responseText; document.getElementById('showMessageh').style.display='none'; } } xmlHttp8.onreadystatechange=function() { if(xmlHttp8.readyState==4) { document.getElementById('resulti').innerHTML = xmlHttp8.responseText; document.getElementById('showMessagei').style.display='none'; } }
[jQuery] Re: Serial Scroll, animated images look jagged
Bump. Does anyone have any ideas why the images seem to fragment? On Dec 19, 3:24 pm, jen timeyout...@gmail.com wrote: http://www.louriecutler.com.ws019.alentus.com/people/slider.php What am I doing wrong, that the images slide across looking so jagged? Thanks!
[jQuery] Re: insert div into group ordered by ID..
try this, it will insert gamma1 before epsilon. $('#gamma~#epsilon').before('div id=gamma1/'); I first used after(), but that didn't work, looks like $ ('#gamma~#epsilon') selects #epsilon. On Dec 22, 10:48 am, Tbone 95dak...@gmail.com wrote: I'm a relative newbie with jQuery and have read the doc about DOM manipulation but am too dense to answer this question: I have a series of DIVs in order by ID. I would like to insert a new DIV into its proper place in the order... Given the following: div div id=alpha/div div id=beta/div div id=gamma/div div id=epsilon/div /div How would I be able to insert the following div in its correct spot (between gamma and epsilon)? div id=alpha/div Thanks in advance!
[jQuery] Re: remove ID
http://docs.jquery.com/Attributes/removeAttr Actually it only replaces the value with an empty string just as plain js: element.removeAttribute() On Dec 22, 5:49 pm, Mike Dodge dmikest...@gmail.com wrote: Is it possible to remove an ID from an element with Jquery or javascript for that matter? I've searched and all I can find is how to remove the whole element, I just want to remove the ID.Thanks Mike
[jQuery] Re: insert div into group ordered by ID..
Great! Thanks... However, I'm more clueless than I should be...and didn't pose the complete question... I have the divs as shown above, how do I locate where div id=delta/div would go? Obviously between gamma and epsilon, but I need to search the ids for the first (id delta). Then I can use your insert to properly place it. I assume I use a selector, but am not sure how to put it together. On Dec 22, 10:25 am, ksun kavi.sunda...@gmail.com wrote: try this, it will insert gamma1 before epsilon. $('#gamma~#epsilon').before('div id=gamma1/'); I first used after(), but that didn't work, looks like $ ('#gamma~#epsilon') selects #epsilon.
[jQuery] Re: jQuery Cycle Plugin: 1 pager to control 2 slideshows
wow that works awesome. even able to apply it to several cycles. i saw a posting about applying a delay to several cycles so that one starts a couple seconds after another cycle (http://groups.google.com/group/ jquery-en/browse_thread/thread/fa74609bb63f46a/40f0bec91d0c6574? lnk=gstq=jquery+cycle+page+delay#40f0bec91d0c6574). i tried to apply that example to this one so that when you press a pager button it starts 1 cycle and the 2nd cycle starts about 1 - 2 seconds after but couldn't get it to work. i appreciate any advice that can be given. On Dec 13, 8:40 am, Mike Alsup mal...@gmail.com wrote: I have been searching for a way to have1pagerto control2 slideshowswith the same number of slides. Where one slideshow can have a scrollLeft and another just with a fade. Is this possible with the current plugin? Here's a demo: http://jquery.malsup.com/cycle/pagers.html
[jQuery] Re: Order of hiding container-divs and their content matters on IE6,7
Hi Ripple and Ricardo, Thanx for your reactions. @ ripple: Feel free to view the source code of the demonstration page (see link I posted), there are some clarifying comments inside. @ Ricardo: indeed it is quite strange that the IE webdeveloper toolbar says 'display=none' and nevertheless the element is visible. That indeed points in the direction of an IE bug. I only wasn't sure whether there might be something in jQuery that triggers on IE on hasLayout (which in turn is triggered by position:absolute), and guessed that people deeply versed into jQuery's source code maybe could directly point the way in that, better than I could try to find it. @ Ricardo: Visibility: hidden is a good fix indeed, thanx! Didn't try that yet after having struggled for many hours to sort down the problem, but logical solution. Indeed in my 'own home-grown library', which I always used before jQuery came around, I always *combined* display: none and visibility:hidden, to hide things. Would this be an option for JQuery's hide()/show() functions, or would that have other drawbacks? Absolute positioning is frequently needed and containers with content are also common, in my experience (anatomical e-learning with layers of images exactly stacked on top of each other, each adding structures to the whole) In any case, it's reassuring that I didn't seem to have overlooked something basically as far as seems now. Thanx! On Dec 22, 3:17 am, ripple ripple...@yahoo.com wrote: He said that was a demonstration/example. He didn't say that it's his code. --- On Sun, 12/21/08, Ricardo Tomasi ricardob...@gmail.com wrote: From: Ricardo Tomasi ricardob...@gmail.com Subject: [jQuery] Re: Order of hiding container-divs and their content matters on IE6,7 To: jQuery (English) jquery-en@googlegroups.com Date: Sunday, December 21, 2008, 8:26 PM He just did. Why not read it? On Dec 21, 10:19 pm, ripple ripple...@yahoo.com wrote: How about posting your code? http://2whoa.com/dominate --- On Sun, 12/21/08, Paul o.p.go...@gmail.com wrote: From: Paul o.p.go...@gmail.com Subject: [jQuery] Order of hiding container-divs and their content matters on IE6,7 To: jQuery (English) jquery-en@googlegroups.com Date: Sunday, December 21, 2008, 7:10 PM In IE, when having elements containing other elements, ie. a div containing images, when attempting to hide a content-element of a hidden container-div, this won't work, it won't even be possible anymore after re-showing the div. This problem occurs: - only on IE6,7 (didn't try IE8), the problem doesn't occur on FF3, Op9, Saf3(Win), Chrome - only when both the container div and the content are absolutely positioned (tested both with jQuery 1.2.3 and 1.2.6) It is demonstrated here: http://www.justarrangingbits.org/webtech/jquery/demos/hideorder.htm I guess it is connected to 'hasLayout' on IE, but don't know how exactly. Struggled nearly a complete day to narrow down to what seems to be the problematic combination. Am I making a mistake? Is it a bug? Thanks for any information or help.
[jQuery] Help Test jQuery 1.3 Beta 1
Hi Everyone - The jQuery dev team just got jQuery 1.3 Beta 1 out the door. Help us test this release and make sure it goes nice and smoothly! http://blog.jquery.com/2008/12/22/help-test-jquery-13-beta-1/ Thanks in advance. --John
[jQuery] Re: Giving a text link a hover state when hovering over an image
Is this what you are trying to do? $(document).ready(function(){ // This is the border code $(img, li.img-corner).hover( function(){ $(this).next(li.event).css({borderBottom: 1px solid #00}); }, function(){ $(this).next(li.event).css({borderBottom: 0}); } ); // This is the image code $(a, li.event).hover( function(){ $(this).prev(li).find(img).attr(src,PICTURE2.jpg) }, function(){ $(this).prev(li).find(img).attr(src,assets/img/ woi_luncheonseries.jpg); } ); });
[jQuery] Re: insert div into group ordered by ID..
I wrote a simple plug-in that will insert elements in alphabetical order (by id) for you: http://ff6600.org/j/jquery.insertInOrder.js Use it like: div id=group div id=alpha/div div id=beta/div div id=gamma/div div id=epsilon/div /div $('div id=delta/').insertInOrder('#group'); feel free to change the naming and alter the code :] cheers, - ricardo On Dec 22, 3:32 pm, Tbone 95dak...@gmail.com wrote: Great! Thanks... However, I'm more clueless than I should be...and didn't pose the complete question... I have the divs as shown above, how do I locate where div id=delta/div would go? Obviously between gamma and epsilon, but I need to search the ids for the first (id delta). Then I can use your insert to properly place it. I assume I use a selector, but am not sure how to put it together. On Dec 22, 10:25 am, ksun kavi.sunda...@gmail.com wrote: try this, it will insert gamma1 before epsilon. $('#gamma~#epsilon').before('div id=gamma1/'); I first used after(), but that didn't work, looks like $ ('#gamma~#epsilon') selects #epsilon.
[jQuery] How can I generalize this code for all values?
Don't know if that's the best phrasing for the subject, but what I'm trying to do is develop some code that will work for all for inputs of type 'text', instead of hard-coding the id values. The original code is this: $('input#street_number').blur(function() { if (this.value.length == 0) { $('#street-number-required-error').fadeIn(500); $('#submit').attr('disabled', 'disabled') } if (this.value.length 0) { $('#street-number-required-error').fadeOut(500); $('#submit').attr('disabled', '') }; }); $('input#street_name').blur(function() { if (this.value.length == 0) { $('#street-name-required-error').fadeIn(500); $('#submit').attr('disabled', 'disabled') } if (this.value.length 0) { $('#street-name-required-error').fadeOut(500); $('#submit').attr('disabled', '') }; }); Here's my coding attempt: (no errors in firebug, but not response from the DOM)... $(document).ready(function() { $(inp...@type='text']).each(function(i) { $(this).blur(function() { if (this.value.length == 0) { $(this.id.replace(/_/g, '-')+'-error').fadeIn(500); $('#submit').attr('disabled', 'disabled') } else { $(this.id.replace(/_/g, '-')+'-error').fadeOut(500); $('#submit').attr('disabled', '') } }); }); }); Anyone care to offer guidance to get this working? Thanks, Rick
[jQuery] tablesorter order positive and negative numbers
I have a tablesorter with a column with positive and negative numbers, and I`m using the tablesorter`s parser digit but it doesn`t order fine, is there any other parser that works ok? Thanks!! sole ts.addParser({ id: digit, is: function(s,table) { var c = table.config; return $.tablesorter.isDigit(s,c); }, format: function(s) { return $.tablesorter.formatFloat(s); }, type: numeric }); $(#my_table).tablesorter({headers: {1: {sorter:'date/MM/DD'}, 5: {sorter: 'digit'} },widgets: ['zebra']});
[jQuery] Re: insert div into group ordered by ID..
//locate the div before which you want to insert and then insert, assuming they are ordered alphabetically $('div[id]').each(function(){ if ($(this).attr('id') 'delta') $(this).before('div id=delta/'); }); I think there is no selector that will do the same, but I may be wrong. On Dec 22, 12:32 pm, Tbone 95dak...@gmail.com wrote: Great! Thanks... However, I'm more clueless than I should be...and didn't pose the complete question... I have the divs as shown above, how do I locate where div id=delta/div would go? Obviously between gamma and epsilon, but I need to search the ids for the first (id delta). Then I can use your insert to properly place it. I assume I use a selector, but am not sure how to put it together. On Dec 22, 10:25 am, ksun kavi.sunda...@gmail.com wrote: try this, it will insert gamma1 before epsilon. $('#gamma~#epsilon').before('div id=gamma1/'); I first used after(), but that didn't work, looks like $ ('#gamma~#epsilon') selects #epsilon.- Hide quoted text - - Show quoted text -
[jQuery] Re: insert div into group ordered by ID..
My expectation was an explanation, but many thanks for going the extra mile, Ricardo On Dec 22, 11:04 am, Ricardo Tomasi ricardob...@gmail.com wrote: I wrote a simple plug-in that will insert elements in alphabetical order (by id) for you:http://ff6600.org/j/jquery.insertInOrder.js Use it like: div id=group div id=alpha/div div id=beta/div div id=gamma/div div id=epsilon/div /div $('div id=delta/').insertInOrder('#group'); feel free to change the naming and alter the code :] cheers, - ricardo On Dec 22, 3:32 pm, Tbone 95dak...@gmail.com wrote: Great! Thanks... However, I'm more clueless than I should be...and didn't pose the complete question... I have the divs as shown above, how do I locate where div id=delta/div would go? Obviously between gamma and epsilon, but I need to search the ids for the first (id delta). Then I can use your insert to properly place it. I assume I use a selector, but am not sure how to put it together. On Dec 22, 10:25 am, ksun kavi.sunda...@gmail.com wrote: try this, it will insert gamma1 before epsilon. $('#gamma~#epsilon').before('div id=gamma1/'); I first used after(), but that didn't work, looks like $ ('#gamma~#epsilon') selects #epsilon.
[jQuery] Re: How can I generalize this code for all values?
Just some advice: why mix - and _ all up? it makes it easier if they were the same for instance input type=text id=street_number / img id=street_number_error src=error.png / input type=text id=street_name / img id=street_name_error src=error.png / $(input[id^='street_']).each(function() { var val = $.trim(this.value); if (val == ) { $(# + this.id + _error).fadeIn(500); } else { $(# + this.id + _error).fadeOut(500); } $(#submit).attr(disabled, (val == ) ? disabled : ); }); On Dec 22, 1:10 pm, Rick Faircloth r...@whitestonemedia.com wrote: Don't know if that's the best phrasing for the subject, but what I'm trying to do is develop some code that will work for all for inputs of type 'text', instead of hard-coding the id values. The original code is this: $('input#street_number').blur(function() { if (this.value.length == 0) { $('#street-number-required-error').fadeIn(500); $('#submit').attr('disabled', 'disabled') } if (this.value.length 0) { $('#street-number-required-error').fadeOut(500); $('#submit').attr('disabled', '') }; }); $('input#street_name').blur(function() { if (this.value.length == 0) { $('#street-name-required-error').fadeIn(500); $('#submit').attr('disabled', 'disabled') } if (this.value.length 0) { $('#street-name-required-error').fadeOut(500); $('#submit').attr('disabled', '') }; }); Here's my coding attempt: (no errors in firebug, but not response from the DOM)... $(document).ready(function() { $(inp...@type='text']).each(function(i) { $(this).blur(function() { if (this.value.length == 0) { $(this.id.replace(/_/g, '-')+'-error').fadeIn(500); $('#submit').attr('disabled', 'disabled') } else { $(this.id.replace(/_/g, '-')+'-error').fadeOut(500); $('#submit').attr('disabled', '') } }); }); }); Anyone care to offer guidance to get this working? Thanks, Rick
[jQuery] two submits in the same form
Hello, here I provide more of my code so we you see exactly what I'm trying to accomplish... code: $(document).ready(function() { var validator = $(#form1).bind(invalid-form.validate, function() { $(#summary).html(trtd aling='right' width='2%' class='ico'img src='warning.gif' width='16' height='15' //td+ td width='98%' valign='top' aling='center' class='err_validation'+ t1taglib:PrintMsg msgcode=RECOVERABLE_ERROR_MSG //td/tr); }).validate({ rules: { errorContainer: $(#summary), input1: required, input2: required, input3: required }, messages: { input1: t1taglib:ShowErrorHelp titleCode=input1.name msgcode=GE_NOT_CHOSEN /, input2: t1taglib:ShowErrorHelp titleCode=input2.name msgcode=GE_NOT_CHOSEN /, input3: t1taglib:ShowErrorHelp titleCode=input3.name msgcode=GE_NOT_CHOSEN / } } }); }); form id=form1 method=post input type=text id=input1 input type=text id=input2 input type=text id=input3 input type=submit value=Submit button name=Submit a id=submit href=#Submit link/a /form I have the submit button that validate that input1, input2 and input3 are complete and then submit the form (redirect to page1.jsp) And I need to have a link that opens a pop-up window after checking that input1 is not empty. So I think that maybe I can have two diferent validations form the same form, one for the submit button (the one I`m doing in this code) and one for the submit link (that need to check that input1 is required), but I`m a begginer in jquery so I don`t know if it is possible... Anybody could help me?? Thank! Sole.
[jQuery] Re: How can I generalize this code for all values?
Thanks for the reply and code... As far as the _ vs -, I've been trying to standardize on using _ for input names (which is necessary for the database) and - for the id's and classes, but now, working with jQuery like this, it is creating a problem. Rick -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of MorningZ Sent: Monday, December 22, 2008 1:44 PM To: jQuery (English) Subject: [jQuery] Re: How can I generalize this code for all values? Just some advice: why mix - and _ all up? it makes it easier if they were the same for instance input type=text id=street_number / img id=street_number_error src=error.png / input type=text id=street_name / img id=street_name_error src=error.png / $(input[id^='street_']).each(function() { var val = $.trim(this.value); if (val == ) { $(# + this.id + _error).fadeIn(500); } else { $(# + this.id + _error).fadeOut(500); } $(#submit).attr(disabled, (val == ) ? disabled : ); }); On Dec 22, 1:10 pm, Rick Faircloth r...@whitestonemedia.com wrote: Don't know if that's the best phrasing for the subject, but what I'm trying to do is develop some code that will work for all for inputs of type 'text', instead of hard-coding the id values. The original code is this: $('input#street_number').blur(function() { if (this.value.length == 0) { $('#street-number-required-error').fadeIn(500); $('#submit').attr('disabled', 'disabled') } if (this.value.length 0) { $('#street-number-required-error').fadeOut(500); $('#submit').attr('disabled', '') }; }); $('input#street_name').blur(function() { if (this.value.length == 0) { $('#street-name-required-error').fadeIn(500); $('#submit').attr('disabled', 'disabled') } if (this.value.length 0) { $('#street-name-required-error').fadeOut(500); $('#submit').attr('disabled', '') }; }); Here's my coding attempt: (no errors in firebug, but not response from the DOM)... $(document).ready(function() { $(inp...@type='text']).each(function(i) { $(this).blur(function() { if (this.value.length == 0) { $(this.id.replace(/_/g, '-')+'-error').fadeIn(500); $('#submit').attr('disabled', 'disabled') } else { $(this.id.replace(/_/g, '-')+'-error').fadeOut(500); $('#submit').attr('disabled', '') } }); }); }); Anyone care to offer guidance to get this working? Thanks, Rick
[jQuery] Re: insert div into group ordered by ID..
Thanks to you, too, ksunBetween you and Ricardo, I think I understand this now! On Dec 22, 11:42 am, ksun kavi.sunda...@gmail.com wrote: //locate the div before which you want to insert and then insert, assuming they are ordered alphabetically $('div[id]').each(function(){ if ($(this).attr('id') 'delta') $(this).before('div id=delta/'); }); I think there is no selector that will do the same, but I may be wrong. On Dec 22, 12:32 pm, Tbone 95dak...@gmail.com wrote: Great! Thanks... However, I'm more clueless than I should be...and didn't pose the complete question... I have the divs as shown above, how do I locate where div id=delta/div would go? Obviously between gamma and epsilon, but I need to search the ids for the first (id delta). Then I can use your insert to properly place it. I assume I use a selector, but am not sure how to put it together. On Dec 22, 10:25 am, ksun kavi.sunda...@gmail.com wrote: try this, it will insert gamma1 before epsilon. $('#gamma~#epsilon').before('div id=gamma1/'); I first used after(), but that didn't work, looks like $ ('#gamma~#epsilon') selects #epsilon.- Hide quoted text - - Show quoted text -
[jQuery] unbinding certain events
I remember reading somewhere and hear at the conference about how you can add some to the event string in the bind method like: $(this).bind('click:my_plugin', function(){}); And then if you wanted to just remove that binding event, while leaving all the other events still there, you could do: $(this).unbind('click:my_plugin'); I just can't remember the exact syntax. Does anything know if this is true? If so does anyone know the correct syntax for doing this? -- View this message in context: http://www.nabble.com/unbinding-certain-events-tp21133100s27240p21133100.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: insert div into group ordered by ID..
I thought you wanted to insert the new element in order according to the *Greek* alphabet. That will take a bit of extra work. -Mike From: Tbone Thanks to you, too, ksunBetween you and Ricardo, I think I understand this now! On Dec 22, 11:42 am, ksun kavi.sunda...@gmail.com wrote: //locate the div before which you want to insert and then insert, assuming they are ordered alphabetically $('div[id]').each(function(){ if ($(this).attr('id') 'delta') $(this).before('div id=delta/'); }); I think there is no selector that will do the same, but I may be wrong. On Dec 22, 12:32 pm, Tbone 95dak...@gmail.com wrote: Great! Thanks... However, I'm more clueless than I should be...and didn't pose the complete question... I have the divs as shown above, how do I locate where div id=delta/div would go? Obviously between gamma and epsilon, but I need to search the ids for the first (id delta). Then I can use your insert to properly place it. I assume I use a selector, but am not sure how to put it together. On Dec 22, 10:25 am, ksun kavi.sunda...@gmail.com wrote: try this, it will insert gamma1 before epsilon. $('#gamma~#epsilon').before('div id=gamma1/'); I first used after(), but that didn't work, looks like $ ('#gamma~#epsilon') selects #epsilon.- Hide quoted text - - Show quoted text -
[jQuery] Re: unbinding certain events
Straight from the Docs http://docs.jquery.com/Events/unbind#typefn On Dec 22, 1:59 pm, Eridius bas...@gmail.com wrote: I remember reading somewhere and hear at the conference about how you can add some to the event string in the bind method like: $(this).bind('click:my_plugin', function(){}); And then if you wanted to just remove that binding event, while leaving all the other events still there, you could do: $(this).unbind('click:my_plugin'); I just can't remember the exact syntax. Does anything know if this is true? If so does anyone know the correct syntax for doing this? -- View this message in context:http://www.nabble.com/unbinding-certain-events-tp21133100s27240p21133... Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: How can I generalize this code for all values?
Rick - one shortcut you can do in your selector is: $('input:text').each(function... That might get you a better response from the DOM. I think the problem you are seeing might be because of your single quotes around text: $('input[type=text]') not $(inp...@type='text']). -- Josh -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Rick Faircloth Sent: Monday, December 22, 2008 10:10 AM To: jquery-en@googlegroups.com Subject: [jQuery] How can I generalize this code for all values? Don't know if that's the best phrasing for the subject, but what I'm trying to do is develop some code that will work for all for inputs of type 'text', instead of hard-coding the id values. The original code is this: $('input#street_number').blur(function() { if (this.value.length == 0) { $('#street-number-required-error').fadeIn(500); $('#submit').attr('disabled', 'disabled') } if (this.value.length 0) { $('#street-number-required-error').fadeOut(500); $('#submit').attr('disabled', '') }; }); $('input#street_name').blur(function() { if (this.value.length == 0) { $('#street-name-required-error').fadeIn(500); $('#submit').attr('disabled', 'disabled') } if (this.value.length 0) { $('#street-name-required-error').fadeOut(500); $('#submit').attr('disabled', '') }; }); Here's my coding attempt: (no errors in firebug, but not response from the DOM)... $(document).ready(function() { $(inp...@type='text']).each(function(i) { $(this).blur(function() { if (this.value.length == 0) { $(this.id.replace(/_/g, '-')+'-error').fadeIn(500); $('#submit').attr('disabled', 'disabled') } else { $(this.id.replace(/_/g, '-')+'-error').fadeOut(500); $('#submit').attr('disabled', '') } }); }); }); Anyone care to offer guidance to get this working? Thanks, Rick
[jQuery] Re: How can I generalize this code for all values?
I see in your example code that you're still using a hard-coded name for the input. I'd like it completely generalized for all variables. I'm working towards creating code for categories of input types: text, radio, checkbox, and textarea, etc. I modified your example, and all seems to be working well with the code below, except that the submit button is becoming enabled even when there is an error message showing. I don't understand the last line enough to even tinker with that...suggestions? Thanks, Rick Here's the new code: $(document).ready(function() { $(inp...@type='text']).each(function() { $(this).blur(function() { var val = $.trim(this.value); if (val == ) { $(# + this.id + _error).fadeIn(500); } else { $(# + this.id + _error).fadeOut(500); } $(#submit).attr('disabled', (val == ) ? disabled : ); }); }); }); -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of MorningZ Sent: Monday, December 22, 2008 1:44 PM To: jQuery (English) Subject: [jQuery] Re: How can I generalize this code for all values? Just some advice: why mix - and _ all up? it makes it easier if they were the same for instance input type=text id=street_number / img id=street_number_error src=error.png / input type=text id=street_name / img id=street_name_error src=error.png / $(input[id^='street_']).each(function() { var val = $.trim(this.value); if (val == ) { $(# + this.id + _error).fadeIn(500); } else { $(# + this.id + _error).fadeOut(500); } $(#submit).attr(disabled, (val == ) ? disabled : ); }); On Dec 22, 1:10 pm, Rick Faircloth r...@whitestonemedia.com wrote: Don't know if that's the best phrasing for the subject, but what I'm trying to do is develop some code that will work for all for inputs of type 'text', instead of hard-coding the id values. The original code is this: $('input#street_number').blur(function() { if (this.value.length == 0) { $('#street-number-required-error').fadeIn(500); $('#submit').attr('disabled', 'disabled') } if (this.value.length 0) { $('#street-number-required-error').fadeOut(500); $('#submit').attr('disabled', '') }; }); $('input#street_name').blur(function() { if (this.value.length == 0) { $('#street-name-required-error').fadeIn(500); $('#submit').attr('disabled', 'disabled') } if (this.value.length 0) { $('#street-name-required-error').fadeOut(500); $('#submit').attr('disabled', '') }; }); Here's my coding attempt: (no errors in firebug, but not response from the DOM)... $(document).ready(function() { $(inp...@type='text']).each(function(i) { $(this).blur(function() { if (this.value.length == 0) { $(this.id.replace(/_/g, '-')+'-error').fadeIn(500); $('#submit').attr('disabled', 'disabled') } else { $(this.id.replace(/_/g, '-')+'-error').fadeOut(500); $('#submit').attr('disabled', '') } }); }); }); Anyone care to offer guidance to get this working? Thanks, Rick
[jQuery] Re: How can I generalize this code for all values?
Try this change $(#submit).attr('disabled', (val == ) ? disabled : null); If that doesn't work, then perhaps: if (val == ) { $(# + this.id + _error).fadeIn(500); $(#submit).attr(disabled, disabled); } else { $(# + this.id + _error).fadeOut(500); $(#submit).removeAttr(disabled); } On Dec 22, 2:21 pm, Rick Faircloth r...@whitestonemedia.com wrote: I see in your example code that you're still using a hard-coded name for the input. I'd like it completely generalized for all variables. I'm working towards creating code for categories of input types: text, radio, checkbox, and textarea, etc. I modified your example, and all seems to be working well with the code below, except that the submit button is becoming enabled even when there is an error message showing. I don't understand the last line enough to even tinker with that...suggestions? Thanks, Rick Here's the new code: $(document).ready(function() { $(inp...@type='text']).each(function() { $(this).blur(function() { var val = $.trim(this.value); if (val == ) { $(# + this.id + _error).fadeIn(500); } else { $(# + this.id + _error).fadeOut(500); } $(#submit).attr('disabled', (val == ) ? disabled : ); }); }); }); -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of MorningZ Sent: Monday, December 22, 2008 1:44 PM To: jQuery (English) Subject: [jQuery] Re: How can I generalize this code for all values? Just some advice: why mix - and _ all up? it makes it easier if they were the same for instance input type=text id=street_number / img id=street_number_error src=error.png / input type=text id=street_name / img id=street_name_error src=error.png / $(input[id^='street_']).each(function() { var val = $.trim(this.value); if (val == ) { $(# + this.id + _error).fadeIn(500); } else { $(# + this.id + _error).fadeOut(500); } $(#submit).attr(disabled, (val == ) ? disabled : ); }); On Dec 22, 1:10 pm, Rick Faircloth r...@whitestonemedia.com wrote: Don't know if that's the best phrasing for the subject, but what I'm trying to do is develop some code that will work for all for inputs of type 'text', instead of hard-coding the id values. The original code is this: $('input#street_number').blur(function() { if (this.value.length == 0) { $('#street-number-required-error').fadeIn(500); $('#submit').attr('disabled', 'disabled') } if (this.value.length 0) { $('#street-number-required-error').fadeOut(500); $('#submit').attr('disabled', '') }; }); $('input#street_name').blur(function() { if (this.value.length == 0) { $('#street-name-required-error').fadeIn(500); $('#submit').attr('disabled', 'disabled') } if (this.value.length 0) { $('#street-name-required-error').fadeOut(500); $('#submit').attr('disabled', '') }; }); Here's my coding attempt: (no errors in firebug, but not response from the DOM)... $(document).ready(function() { $(inp...@type='text']).each(function(i) { $(this).blur(function() { if (this.value.length == 0) { $(this.id.replace(/_/g, '-')+'-error').fadeIn(500); $('#submit').attr('disabled', 'disabled') } else { $(this.id.replace(/_/g, '-')+'-error').fadeOut(500); $('#submit').attr('disabled', '') } }); }); }); Anyone care to offer guidance to get this working? Thanks, Rick --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups jQuery (English) group. To post to this group, send email to jquery-en@googlegroups.com To unsubscribe from this group, send email to jquery-en+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-en?hl=en -~--~~~~--~~--~--~---
[jQuery] Re: Help Test jQuery 1.3 Beta 1
will sure do right now, as i'm about to release another experiment-in-webdesign, end of january, and will need the best javascript library to support it. Thanks a lot ! On Mon, Dec 22, 2008 at 6:49 PM, John Resig jere...@gmail.com wrote: Hi Everyone - The jQuery dev team just got jQuery 1.3 Beta 1 out the door. Help us test this release and make sure it goes nice and smoothly! http://blog.jquery.com/2008/12/22/help-test-jquery-13-beta-1/ Thanks in advance. --John
[jQuery] Re: Error on validation plugin documentation?
Jörn Zaefferer ha scritto: Fixed! Thanks for reporting. Thanks to you for sharing your great work! -- gianiaz.net - web solutions via angelo custode, 10 - 23100 sondrio (so) - italy +39 347 7196482
[jQuery] Re: How to get parts of URL after domain
Could you explain that construct? I'm no JS expert, and I haven't seen it before. Thanks. If you want to do it in JavaScript, you don't need jQuery, regular expressions, or indexOf. window.location (or just location) has several properties that give you different pieces of the URL. location.pathname is the one you want here. Note that it includes the leading slash. For example: var img = { '/services': 'one-image.png', '/about-us': 'another-image.png' }[location.pathname] || 'default-image.png'; -Mike
[jQuery] Re: two submits in the same form
Take a look at this demo: http://jquery.bassistance.de/validate/demo/login/ The forgot password link should be quite close to what you're trying to do. Jörn On Mon, Dec 22, 2008 at 7:47 PM, Soledad Zubiri szub...@gmail.com wrote: Hello, here I provide more of my code so we you see exactly what I'm trying to accomplish... code: $(document).ready(function() { var validator = $(#form1).bind(invalid-form.validate, function() { $(#summary).html(trtd aling='right' width='2%' class='ico'img src='warning.gif' width='16' height='15' //td+ td width='98%' valign='top' aling='center' class='err_validation'+ t1taglib:PrintMsg msgcode=RECOVERABLE_ERROR_MSG //td/tr); }).validate({ rules: { errorContainer: $(#summary), input1: required, input2: required, input3: required }, messages: { input1: t1taglib:ShowErrorHelp titleCode=input1.name msgcode=GE_NOT_CHOSEN /, input2: t1taglib:ShowErrorHelp titleCode=input2.name msgcode=GE_NOT_CHOSEN /, input3: t1taglib:ShowErrorHelp titleCode=input3.name msgcode=GE_NOT_CHOSEN / } } }); }); form id=form1 method=post input type=text id=input1 input type=text id=input2 input type=text id=input3 input type=submit value=Submit button name=Submit a id=submit href=#Submit link/a /form I have the submit button that validate that input1, input2 and input3 are complete and then submit the form (redirect to page1.jsp) And I need to have a link that opens a pop-up window after checking that input1 is not empty. So I think that maybe I can have two diferent validations form the same form, one for the submit button (the one I`m doing in this code) and one for the submit link (that need to check that input1 is required), but I`m a begginer in jquery so I don`t know if it is possible... Anybody could help me?? Thank! Sole.
[jQuery] Re: How to get parts of URL after domain
Sure, it's just a combination of some other JavaScript features that may look more familiar if we take them one by one: // Use an object literal to create an object // with two properties. Each property has // a name and a value. var images = { '/services': 'one-image.png', '/about-us': 'another-image.png' }; // Select one of the properties from the // object by name, and get its value. If // not found, the value is undefined. // (That doesn't mean an unpredictible // value, it means the specific value in // JavaScript known as undefined.) var img = images[location.pathname]; // Select a default image if img is undefined. img = img || 'default-image.png'; // Or another way to do that last statement // (means exactly the same thing): if( ! img ) img = 'default-image.png'; -Mike From: Wonder95 Could you explain that construct? I'm no JS expert, and I haven't seen it before. Thanks. If you want to do it in JavaScript, you don't need jQuery, regular expressions, or indexOf. window.location (or just location) has several properties that give you different pieces of the URL. location.pathname is the one you want here. Note that it includes the leading slash. For example: var img = { '/services': 'one-image.png', '/about-us': 'another-image.png' }[location.pathname] || 'default-image.png';
[jQuery] Re: Help Test jQuery 1.3 Beta 1
Great!!! On 22 dez, 18:03, Alexandre Plennevaux aplennev...@gmail.com wrote: will sure do right now, as i'm about to release another experiment-in-webdesign, end of january, and will need the best javascript library to support it. Thanks a lot ! On Mon, Dec 22, 2008 at 6:49 PM, John Resig jere...@gmail.com wrote: Hi Everyone - The jQuery dev team just got jQuery 1.3 Beta 1 out the door. Help us test this release and make sure it goes nice and smoothly! http://blog.jquery.com/2008/12/22/help-test-jquery-13-beta-1/ Thanks in advance. --John
[jQuery] cycle plugin ovelapping in IE6/IE7
Hi, I'm trying to position a menu div over a cycle slideshow. It works fine on Safari/Firefox but in IE6/IE7 the menu goes under the cycle slideshow upper slide, till the effect -fade- starts to be applied to the next slide. Is there a means to force the menu div to appear always on top of the cycle slideshow ? Here is a page where theproblem can be seen : http://kubota.cym.fr/?page=test_menu test_menu I'm using cycle pluging version 2.32 and jQuery version 1.2.6. I would very much appreciate an help on this subject. Does anyone have an idea to solve this problem ? Many thanks in advance, Regards, Cyril -- View this message in context: http://www.nabble.com/cycle-plugin-ovelapping-in-IE6-IE7-tp21131740s27240p21131740.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Rewrite $('slide-images').getElementsByTagName('li'); with JQuery
div id=slide-show ul id=slide-images lia href=accordion1.jpg class=thickbox rel=gallery- plants img src=accordion1.jpg alt=One title=One //a/li lia href=accordion2.jpg class=thickbox rel=gallery- plants img src=accordion2.jpg alt=Two title=Two //a/li lia href=accordion3.jpg class=thickbox rel=gallery- plants img src=accordion3.jpg alt=Three title=Three //a/li /ul /div how can i rewrite this function using JQuery ?! function init() { var lis = $('slide-images').getElementsByTagName('li'); for( i=0; i lis.length; i++){ if(i!=0){ lis[i].style.display = 'none'; } } LastPic = lis.length -1; }
[jQuery] Re: Smarter way to write this repetitive code?
and if you have _really_ a lot of elements... instead of a listener on each, just use one - var $hl = $('.headline'); $hl.click(function(e) { $('.article-text').eq( $hl.index(e.target) ).fadeIn(); }); On Dec 21, 5:57 am, Kean shenan...@gmail.com wrote: Some performance improvement, especially if you have a lot of elements. var txt = $('.article-text'); $('.headline').each(function(i) { $(this).click(function() { $(txt[i]).fadeIn(); }) });
[jQuery] Can datepicker do individual linking?
For instance if someone chooses 5/5/09 in datepicker I would like them to be linked to one html page. In contrast, if someone chooses 4/2/09 I would like them linked to another html page. Each day will have it's own individual html page. Is this possible in datepicker?
[jQuery] change element attribute, then have jquery act on that change?
I'm using filters to find if an li's text matches a certain value, and then changing the value if it does. This works fine. However, if I then use my selectors to check for the new value, jquery does not seem to pick it up, making me wonder if perhaps the selectors only work for values coded into the actual html, not generated by jquery. Here's my example code of what I'm trying to do: HTML snippet: liDonate/li JQUERY code: $(li.dnt:contains('Donate')).click(function(){ $(this).text('Remove'); alert('Donate'); }); $(li.dnt:contains('Remove')).click(function(){ $(this).text('Donate'); alert('Remove'); }); In the example above, the first time I click I get an alert of saying 'Donate.' The second time I click, I should get an alert saying 'Remove,' but instead it just says 'Donate,' even though the text value has changed. Am I missing something, or is this sort of filtering on jquery-generated values not possible? Thanks! Philip
[jQuery] Re: jQuery Cycle Plugin: 1 pager to control 2 slideshows
wow that works awesome. even able to apply it to several cycles. i saw a posting about applying a delay to several cycles so that one starts a couple seconds after another cycle (http://groups.google.com/group/ jquery-en/browse_thread/thread/fa74609bb63f46a/40f0bec91d0c6574? lnk=gstq=jquery+cycle+page+delay#40f0bec91d0c6574). i tried to apply that example to this one so that when you press a pager button it starts 1 cycle and the 2nd cycle starts about 1 - 2 seconds after but couldn't get it to work. i appreciate any advice that can be given. The 'delay' option is used to delay the first transition.
[jQuery] Re: cycle plugin ovelapping in IE6/IE7
I'm trying to position a menu div over a cycle slideshow. It works fine on Safari/Firefox but in IE6/IE7 the menu goes under the cycle slideshow upper slide, till the effect -fade- starts to be applied to the next slide. Is there a means to force the menu div to appear always on top of the cycle slideshow ? Here is a page where theproblem can be seen :http://kubota.cym.fr/?page=test_menutest_menu I'm using cycle pluging version 2.32 and jQuery version 1.2.6. I would very much appreciate an help on this subject. Does anyone have an idea to solve this problem ? Give the menus a higher z-index.
[jQuery] Serious bug in JQuery
I have a page that when loaded, it gets a javascript error. It occurs in jquery-1.2.6.js on line 662 on this line: var id = elem[ expando ]; It says elem is undefined. This occurs in IE and FF. This only occurs on this specific page. It is an aspx page. Thanks
[jQuery] Re: Rewrite $('slide-images').getElementsByTagName('li'); with JQuery
Untested, but I think this does it: function init(){ LastPic = $('#slide-images li').slice(1).hide().length; } In jQuery there is probably a better way to do the rest of the code than using a global variable for LastPic, but it depends on what the rest of the code looks like.
[jQuery] Re: Serious bug in JQuery
Sorry, but no one would be able to tell what might be wrong from that description. In most cases, a bug like this is an error in how you're calling a jQuery function. If you use Firebug and have it break on all errors, you can look at the stack trace and see what call you made that triggered the problem. Or, of course, it could be a bug in jQuery itself. Post a link to a test page that illustrates the problem and I'm sure someone can help you out. -Mike From: kayode81un...@gmail.com I have a page that when loaded, it gets a javascript error. It occurs in jquery-1.2.6.js on line 662 on this line: var id = elem[ expando ]; It says elem is undefined. This occurs in IE and FF. This only occurs on this specific page. It is an aspx page. Thanks
[jQuery] Re: Serious bug in JQuery
Care to share some code? Have you done your debugging to determine what line of your code is causing the error from jQuery? Have you posted this bug to the jquery bug mailing list? andy -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of kayode81un...@gmail.com Sent: Monday, December 22, 2008 4:18 PM To: jQuery (English) Subject: [jQuery] Serious bug in JQuery I have a page that when loaded, it gets a javascript error. It occurs in jquery-1.2.6.js on line 662 on this line: var id = elem[ expando ]; It says elem is undefined. This occurs in IE and FF. This only occurs on this specific page. It is an aspx page. Thanks
[jQuery] Re: change element attribute, then have jquery act on that change?
I'm using filters to find if an li's text matches a certain value, and then changing the value if it does. This works fine. However, if I then use my selectors to check for the new value, jquery does not seem to pick it up, making me wonder if perhaps the selectors only work for values coded into the actual html, not generated by jquery. Are you executing that block of code each time you change the content? The selectors work for the content that exists at the time you execute it. So for this: $(li.dnt:contains('Donate')).click(function(){ ... }); The click handler is attached for all li.dnt elements that contain Donate at that point in time. If you later add the text Donate to a li.dnt element that didn't previously have it, jQuery is not constantly checking the document to determine that you have done this. If you really want that behavior of having jQuery constantly check for updates and attaching handlers, check out the livequery plugin.
[jQuery] how to select the content of the current table row?
Hey guys, i'm having a hard time with jquery right now. Imagine the following simple table: CODE: table border='1' id='list_tracks_table' colgroup col width='40%' / col width='20%' / col width='20%' / col width='20%' / col width='0%' / /colgroup thead tr thTitle/th th Genre /th th Speed /th th Length /th /tr /thead tbody tr td Cocktail Lounge /td td Chill /td td 126 /td td 03:03 /td td class='hidden_url_field_for_track_list' /mp3/stream/MM-MB-0030-COCKTAIL-LOUNGE-126BPM.mp3 As you can see, the last field of the row gets hidden via CSS. Now i have defined an onclick-Handler for every row of the table like this: CODE: function addClickHandler(tableId) { var tableObj = document.getElementById(tableId); var tBody = tableObj.getElementsByTagName('TBODY'); if(tBody){ var rows = tBody[0].getElementsByTagName('TR'); }else{ var rows = tableObj.getElementsByTagName('TR'); } for(var no=0;norows.length;no++){ rows[no].onclick = clickOnTableRow } } 'clickOnTableRow' looks like this: CODE: function clickOnTableRow() { alert (working!) } Now, clickOnTableRow() is working when i click on a table row (i can see that because of the alert-box), but how can i now select the contents of the last hidden field of this exact row? I tried it like this: CODE: function clickOnTableRow() { var foo = jQuery(this).('hidden_url_field_for_track_list').text(); console.info(content: + foo); } but this gives me: content: undefined Then i tried: function clickOnTableRow() { var foo = jQuery('hidden_url_field_for_track_list').text(); console.info(content: + foo); } but this gives me just: content: What am i doing wrong here? But no
[jQuery] IE focus issues when a drop-down is filled via Ajax
Hello, I have a a drop-down box (select and option) that is empty until clicked, at which time $.getJSON() adds a number of option tags. The problem is how Firefox and IE behave after the data is inserted into the down-down. FF keeps the drop-down open so the user can immediately view all the options. IE, however, blurs the drop-down after the data is loaded so the user has to click the drop-down again to see the new info. My first thought was to add a focus() event, but that does not cause the drop-down to open in IE. I also tried scroll(), but while FF recognizes scroll events on drop-downs, IE does not. Anyone have an idea how to solve this problem? Thanks a lot for the help.
[jQuery] Re: how to select the content of the current table row?
var rows = jQuery(tbody tr); rows.each(function(){ var row = jQuery(this) row.click(function(event){ alert(row.children(td.hidden_url_field_for_track_list).text()); }); }); Haven't tested but you could try something like this maybe. On Tue, Dec 23, 2008 at 11:40 AM, j0llyr0g3r th3.gr31t.j0lly.r0...@googlemail.com wrote: Hey guys, i'm having a hard time with jquery right now. Imagine the following simple table: CODE: table border='1' id='list_tracks_table' colgroup col width='40%' / col width='20%' / col width='20%' / col width='20%' / col width='0%' / /colgroup thead tr thTitle/th th Genre /th th Speed /th th Length /th /tr /thead tbody tr td Cocktail Lounge /td td Chill /td td 126 /td td 03:03 /td td class='hidden_url_field_for_track_list' /mp3/stream/MM-MB-0030-COCKTAIL-LOUNGE-126BPM.mp3 As you can see, the last field of the row gets hidden via CSS. Now i have defined an onclick-Handler for every row of the table like this: CODE: function addClickHandler(tableId) { var tableObj = document.getElementById(tableId); var tBody = tableObj.getElementsByTagName('TBODY'); if(tBody){ var rows = tBody[0].getElementsByTagName('TR'); }else{ var rows = tableObj.getElementsByTagName('TR'); } for(var no=0;norows.length;no++){ rows[no].onclick = clickOnTableRow } } 'clickOnTableRow' looks like this: CODE: function clickOnTableRow() { alert (working!) } Now, clickOnTableRow() is working when i click on a table row (i can see that because of the alert-box), but how can i now select the contents of the last hidden field of this exact row? I tried it like this: CODE: function clickOnTableRow() { var foo = jQuery(this).('hidden_url_field_for_track_list').text(); console.info(content: + foo); } but this gives me: content: undefined Then i tried: function clickOnTableRow() { var foo = jQuery('hidden_url_field_for_track_list').text(); console.info(content: + foo); } but this gives me just: content: What am i doing wrong here? But no
[jQuery] Re: how to select the content of the current table row?
var rows = jQuery(tbody tr); rows.each(function(){ var row = jQuery(this); row.click(function(event){ alert(row.children(td.hidden_url_field_for_track_list).text()); }); }); Sorry I missed a semicolon.. On Tue, Dec 23, 2008 at 12:21 PM, Cam Spiers camspi...@gmail.com wrote: var rows = jQuery(tbody tr); rows.each(function(){ var row = jQuery(this) row.click(function(event){ alert(row.children(td.hidden_url_field_for_track_list).text()); }); }); Haven't tested but you could try something like this maybe. On Tue, Dec 23, 2008 at 11:40 AM, j0llyr0g3r th3.gr31t.j0lly.r0...@googlemail.com wrote: Hey guys, i'm having a hard time with jquery right now. Imagine the following simple table: CODE: table border='1' id='list_tracks_table' colgroup col width='40%' / col width='20%' / col width='20%' / col width='20%' / col width='0%' / /colgroup thead tr thTitle/th th Genre /th th Speed /th th Length /th /tr /thead tbody tr td Cocktail Lounge /td td Chill /td td 126 /td td 03:03 /td td class='hidden_url_field_for_track_list' /mp3/stream/MM-MB-0030-COCKTAIL-LOUNGE-126BPM.mp3 As you can see, the last field of the row gets hidden via CSS. Now i have defined an onclick-Handler for every row of the table like this: CODE: function addClickHandler(tableId) { var tableObj = document.getElementById(tableId); var tBody = tableObj.getElementsByTagName('TBODY'); if(tBody){ var rows = tBody[0].getElementsByTagName('TR'); }else{ var rows = tableObj.getElementsByTagName('TR'); } for(var no=0;norows.length;no++){ rows[no].onclick = clickOnTableRow } } 'clickOnTableRow' looks like this: CODE: function clickOnTableRow() { alert (working!) } Now, clickOnTableRow() is working when i click on a table row (i can see that because of the alert-box), but how can i now select the contents of the last hidden field of this exact row? I tried it like this: CODE: function clickOnTableRow() { var foo = jQuery(this).('hidden_url_field_for_track_list').text(); console.info(content: + foo); } but this gives me: content: undefined Then i tried: function clickOnTableRow() { var foo = jQuery('hidden_url_field_for_track_list').text(); console.info(content: + foo); } but this gives me just: content: What am i doing wrong here? But no
[jQuery] Re: Serious bug in JQuery
I would guess you've passed a parameter to a function, but done so incorrectly. For example writing xyz(bar) when you should have written .xyz( {foo: bar} ) On Dec 22, 5:25 pm, Andy Matthews li...@commadelimited.com wrote: Care to share some code? Have you done your debugging to determine what line of your code is causing the error from jQuery? Have you posted this bug to the jquery bug mailing list? andy -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of kayode81un...@gmail.com Sent: Monday, December 22, 2008 4:18 PM To: jQuery (English) Subject: [jQuery] Serious bug in JQuery I have a page that when loaded, it gets a javascript error. It occurs in jquery-1.2.6.js on line 662 on this line: var id = elem[ expando ]; It says elem is undefined. This occurs in IE and FF. This only occurs on this specific page. It is an aspx page. Thanks
[jQuery] Re: How can I generalize this code for all values?
Ok...after a lot of experimentation, I've got a solution that's working to the point that I've attempted to implement it. Here's the code: $(document).ready(function() { $('input:text.required').each(function() { $(this).blur(function() { var val = (this.value.length); if (val == 0) { $(# + this.id + _error).fadeIn(500); $('#submit').attr('disabled', 'disabled'); } else { $(# + this.id + _error).fadeOut(500); $('#submit').removeAttr('disabled'); }; $('input:text.required').each(function() { var val = (this.value.length); if (val == 0) { $('#submit').attr('disabled', 'disabled'); } }); }); }); }); This code allows for the following: - on blur of any text input with class 'required' the length is checked - if the length of the required field is 0, then the error message is shown and the submit button for the form is disabled - the second half of the code checks all the text inputs with class 'required' - if the length of any of the required text fields is 0, then the submit button is disabled What I need to do now: - Allow for other type of inputs to be checked on blur, etc., such as selects (Later, I'll add other types of validation, such as numeric, etc.) Question: - How do I modify ('input:text.required') to accommodate other types of required inputs? - I tried ('input:text.required, input:select.required') and ('input:text.required', 'input:select.required') but that didn't work Clues or hints? Thanks, Rick -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of MorningZ Sent: Monday, December 22, 2008 2:40 PM To: jQuery (English) Subject: [jQuery] Re: How can I generalize this code for all values? Try this change $(#submit).attr('disabled', (val == ) ? disabled : null); If that doesn't work, then perhaps: if (val == ) { $(# + this.id + _error).fadeIn(500); $(#submit).attr(disabled, disabled); } else { $(# + this.id + _error).fadeOut(500); $(#submit).removeAttr(disabled); } On Dec 22, 2:21 pm, Rick Faircloth r...@whitestonemedia.com wrote: I see in your example code that you're still using a hard-coded name for the input. I'd like it completely generalized for all variables. I'm working towards creating code for categories of input types: text, radio, checkbox, and textarea, etc. I modified your example, and all seems to be working well with the code below, except that the submit button is becoming enabled even when there is an error message showing. I don't understand the last line enough to even tinker with that...suggestions? Thanks, Rick Here's the new code: $(document).ready(function() { $(inp...@type='text']).each(function() { $(this).blur(function() { var val = $.trim(this.value); if (val == ) { $(# + this.id + _error).fadeIn(500); } else { $(# + this.id + _error).fadeOut(500); } $(#submit).attr('disabled', (val == ) ? disabled : ); }); }); }); -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of MorningZ Sent: Monday, December 22, 2008 1:44 PM To: jQuery (English) Subject: [jQuery] Re: How can I generalize this code for all values? Just some advice: why mix - and _ all up? it makes it easier if they were the same for instance input type=text id=street_number / img id=street_number_error src=error.png / input type=text id=street_name / img id=street_name_error src=error.png / $(input[id^='street_']).each(function() { var val = $.trim(this.value); if (val == ) { $(# + this.id + _error).fadeIn(500); } else { $(# + this.id + _error).fadeOut(500); } $(#submit).attr(disabled, (val == ) ? disabled : ); }); On Dec 22, 1:10 pm, Rick Faircloth r...@whitestonemedia.com wrote: Don't know if that's the best phrasing for the subject, but what I'm trying to do is develop some code that will work for all for inputs of type 'text', instead of hard-coding the id values. The original code is this: $('input#street_number').blur(function() { if (this.value.length == 0) { $('#street-number-required-error').fadeIn(500); $('#submit').attr('disabled', 'disabled') } if (this.value.length 0) { $('#street-number-required-error').fadeOut(500);
[jQuery] Re: Smarter way to write this repetitive code?
dbzz, IMO, your code still add a listener to each of the .headline var txt = $('.article-text'); var $hl = $('.headline'); $hl.click(function(e) { $(txt[$hl.index(e.target)]).fadeIn(); }); I highly doubt that this code will run faster than the one using each. On Dec 22, 9:20 am, dbzz j...@briskey.net wrote: and if you have _really_ a lot of elements... instead of a listener on each, just use one - var $hl = $('.headline'); $hl.click(function(e) { $('.article-text').eq( $hl.index(e.target) ).fadeIn(); }); On Dec 21, 5:57 am, Kean shenan...@gmail.com wrote: Some performance improvement, especially if you have a lot of elements. var txt = $('.article-text'); $('.headline').each(function(i) { $(this).click(function() { $(txt[i]).fadeIn(); }) });