[jQuery] Re: Customize Error Labels
Ahh, Thx for the reply. I get it now :) But my labels isn't always the previous element before the fields. So I changed it to suit my markup. Like this: $('form').validate({ errorPlacement: function(error, element) { $('label').each(function() { var field_for = $(this).attr('for'); var field_id = $(element).attr('id'); if (field_for == field_id) { $(this).addClass('error'); } }); } }); Nothing fancy, but it works... Btw, thx for the help.. On Jul 23, 12:17 pm, Jules jwira...@gmail.com wrote: Read errorPlacement on validate docs. $(document).ready(function() { $(form).validate({ errorPlacement: function(error, element) { $(element).prev().addClass(error); } }); }); labelInput:/labelinput type=text id=txtInput name=txtInput class=required / On Jul 23, 3:03 pm, Rizky br4inwas...@gmail.com wrote: Hi, I need help with the Validation plugin. I want to disable the generated error labels and I need to find a way to add the class error to existing form labels instead. Currently I don't use it and simply want to add highlighting to the existing fields and labels. My forms already contain fields with corresponding labels (using the basic for - id relationship). And all i need to do now is to add the class error to these labels if the corresponding fields has errors. Sorry if this question have been asked before. Thx
[jQuery] Re: Catch Exception
It all depends on the data that's returning.I believe the exception would certainly have some data/text that you can use to check if it is an exception and then conditionally update the appropriate div. something like : $(document).ready(function() { $('.DOFFDelete').click(function() { var id = $(this).attr(id); $.post(/Customer/DayOffDelete, { customerid: getCustomerId(), doffId: id }, function(data) { if ( data.matches('exception) ) $('#myExceptionDiv).html(data); else $(#myFormDOFF).html(data); }); }); }); Thanks Regards, Dhruva Sagar. Charles de Gaullehttp://www.brainyquote.com/quotes/authors/c/charles_de_gaulle.html - The better I get to know men, the more I find myself loving dogs. On Thu, Jul 23, 2009 at 11:27 AM, Kris-I kris.i@gmail.com wrote: Hello, In my code (ASP.NET MVC using Nhibernate) , I do this : $(document).ready(function() { $('.DOFFDelete').click(function() { var id = $(this).attr(id); $.post(/Customer/DayOffDelete, { customerid: getCustomerId(), doffId: id }, function(data) { $(#myFormDOFF).html(data); }); }); }); Then I display the result in the DIV named myFormDOFF Of course, my .NET code can generate exception. I'd like when I receive an exception didn't change the content of myFormDOFF but display the message send by the exception in another DIV. How can I do this ? Thanks,
[jQuery] Re: Customize Error Labels
This should work instead of going through all labels. $('form').validate({ errorPlacement: function(error, element) { $('label[for=' + $(element).attr('id') + ']').addClass('error'); }); } }); On Jul 23, 4:00 pm, Rizky br4inwas...@gmail.com wrote: Ahh, Thx for the reply. I get it now :) But my labels isn't always the previous element before the fields. So I changed it to suit my markup. Like this: $('form').validate({ errorPlacement: function(error, element) { $('label').each(function() { var field_for = $(this).attr('for'); var field_id = $(element).attr('id'); if (field_for == field_id) { $(this).addClass('error'); } }); } }); Nothing fancy, but it works... Btw, thx for the help.. On Jul 23, 12:17 pm, Jules jwira...@gmail.com wrote: Read errorPlacement on validate docs. $(document).ready(function() { $(form).validate({ errorPlacement: function(error, element) { $(element).prev().addClass(error); } }); }); labelInput:/labelinput type=text id=txtInput name=txtInput class=required / On Jul 23, 3:03 pm, Rizky br4inwas...@gmail.com wrote: Hi, I need help with the Validation plugin. I want to disable the generated error labels and I need to find a way to add the class error to existing form labels instead. Currently I don't use it and simply want to add highlighting to the existing fields and labels. My forms already contain fields with corresponding labels (using the basic for - id relationship). And all i need to do now is to add the class error to these labels if the corresponding fields has errors. Sorry if this question have been asked before. Thx
[jQuery] Re: li/img click and window.keydown
Up On 20 juil, 18:46, Lideln lid...@gmail.com wrote: Hi, Thanks for the answer. Here is a bit of my script : [code] // Constructing the modal... SModule_gallery.oGalleryModal.jqm({modal: true}) .width((SModule_gallery.GALLERY_COLS * (SModule_gallery.GALLERY_ITEM_WIDTH + 10)) + 4) // 6 et 4 correspondent à des paddings .height(iHeight + 4 + 32) // 32 = height approximative du title .draggable({handle: 'h1'}); $(window).keydown(SModule_gallery.onKeyDown); onKeyDown: function(oEvent) { if (oEvent.keyCode == 27) SModule_gallery.hideGalleryModal(); }, hideGalleryModal: function() { SModule_gallery.oGalleryModal.jqmHide(); $(window).unbind('keydown', SModule_gallery.onKeyDown); }, // Data inside the modal : looping over an ajax answer, displaying several thumbnails sStr += 'li id=galleryThumbnailItem_' + iId + '\ img src=' + SDefines.sUrlAjax + 'getFilePreview.php? fileId=' + iId + 'square=' + SModule_gallery.GALLERY_ITEM_WIDTH + ' title=' + sName + ' /\ /li'; [/code] When I open the modal, and immediately press escape, this works fine : the modal hides itself. But when I first click on a picture (that displays some information in the main window), and then press escape, I have to press escape another time to hide the modal. I could not succeed in catching the first escape event in an event listener (either on $(window), or on the li item, or on the img item) Thanks for any help ! :) On 20 juil, 12:19, Liam Potter radioactiv...@gmail.com wrote: show us you script and stop bumping so often. Lideln wrote: Up ! On 17 juil, 22:47, Lideln lid...@gmail.com wrote: Up ! :) On 16 juil, 22:32, Lideln lid...@gmail.com wrote: up On 16 juil, 08:10, Lideln lid...@gmail.com wrote: up ! (wow, this forum gets 10 new posts per hour) On 15 juil, 21:52, Lideln lid...@gmail.com wrote: Hi everybody ! I have a jqModal window, and I would like to close it using the ESC key. For that purpose, I assign my modal a keydown() event, and if keyCode == 27, I close the modal. It works fine, except when I click on another element in the modal first I have to press 2 times ESC : the first time removes the focus from the element, the second time goes through my listener and closes the modal. In my modal , I have an ul/li list, each li containing an img (for the purpose of an image gallery). When I click on an image (or li ?), I have to press twice ESC to close the modal. I tried to add a $(this).blur() in the li click() event, and also I tried to put that in the img click event, but without success... Does somebody know why it is doing that, and how to fix it, please ? Thanks a lot !
[jQuery] Re: Switching a tabs content from a remote source to a local source
That shouldn't happen and a similiar bug was fixed for IE long time ago. Which browser do you encounter this bug in and which version of jQuery UI do you use? --Klaus On 22 Jul., 19:22, WR willrya...@googlemail.com wrote: It seems that if you change the url of a tab from a remote source (ajax request) to a local source i.e. ('#myTabs').tabs('url', 1, '#myLocalContentDiv'); When you then click on this tab, it makes an ajax request (tohttp://myURL/#myLocalContentDiv) rather than simply showing the local content. This in effect reloads the entire page into the tab. Any way round this, or shall I report this as a bug? Thanks.
[jQuery] Re: Customize Error Labels
sweet. thx man.. On Jul 23, 1:10 pm, Jules jwira...@gmail.com wrote: This should work instead of going through all labels. $('form').validate({ errorPlacement: function(error, element) { $('label[for=' + $(element).attr('id') + ']').addClass('error'); }); } });
[jQuery] Re: jquery code works with firefox but not ie.
I had the same problem only with internet explorer and only when I use a xml generate with php. Using a standard xml there are not problems. I solved using header('Content-Type: text/xml'); as has already explained and also adding before that instruction the command ob_clean() that remove white space in the xml. ?php ob_clean(); echo ?xml version=\1.0\ encoding=\utf-8\?; header('Content-Type: text/xml'); ... ... ... ? Regards Mantas K. wrote: try to right: header('Content-Type: text/xml'); in your php file. I had the same problem with IE and then i've remembered this magic line, it solved my problem On 30 Rugs, 20:33, kelvin pompey silkodys...@gmail.com wrote: I tried the code without ajax. It works in firefox but not in ie. I modelled my code on this example from the sitepoint jquery ajax tutorial. html head titleAJAX with jQuery Example/title script type=text/javascript src=jquery-1.2.6.pack.js/script script type=text/javascript $(document).ready(function(){ timestamp = 0; updateMsg(); $(form#chatform).submit(function(){ $.post(backend.php,{ message: $(#msg).val(), name: $(#author).val(), action: postmsg, time: timestamp}, function(xml) { $(#msg).empty(); addMessages(xml);}); return false; }); }); function addMessages(xml) { if($(status,xml).text() == 2) return; timestamp = $(time,xml).text(); $(message,xml).each(function(id) { message = $(message,xml).get(id); $(#messagewindow).prepend(+$(author,message).text()+ : +$(text,message).text()+ br /);}); } function updateMsg() { $.post(backend.php,{ time: timestamp }, function(xml) { $(#loading).remove(); addMessages(xml);}); setTimeout('updateMsg()', 4000);} /script style type=text/css #messagewindow { height: 250px; border: 1px solid; padding: 5px; overflow: auto;} #wrapper { margin: auto; width: 438px;} /style /head body div id=wrapper p id=messagewindowLoading.../p form id=chatform Name: input type=text id=author / Message: input type=text id=msg / input type=submit value=ok /br / /form /div /body /html This code works in both firefox and ie. I can't figure out what I am doing differently that makes my code not work with ie. On Tue, Sep 30, 2008 at 12:53 PM, Eric estrathme...@gmail.com wrote: I'm a little concerned by this line: client = $(client,data).get(id); I'd recommend putting a var in front so that you have a local, not a global, variable. It also seems to me like $(client,data).get(id) is equivalent to 'this' inside the each. so instead of: client = $(client,data).get(id); use: var client = this; I've never tried to use jQuery with IE and XML data, so I'm not sure what quirks might be caused by that combination. I would recommend trying your function without the AJAX call: var data = insert_your_xml_here; $(client,data).each(function(id) { client = $(client,data).get(id); $(#left_items).append(li id='+$ (id,client).text()+' href='#'+$(name,client).text()+ /li); }); If none of that helps, I'd recommend installing Firebug, and doing some heavy console logging (http://getfirebug.com/console.html), specifically of the variable 'client'. On Sep 30, 12:14 pm, silk.odyssey silkodys...@gmail.com wrote: I have the following code that works in firefox and google chrome using jquery 1.2.6. function setUpClient() { $.post(http://localhost/gestivov2/include/ajax/getclients.php;, {}, function(data){ $('#left_items').empty(); //alert(data); $(client,data).each(function(id) { client = $(client,data).get(id); $(#left_items).append(li id='+$(id,client).text()+' href='#'+$(name,client).text()+ /li); }); }) } It doesn't work with internet explorer 7, 8 beta nor 6. If I uncomment the alert code, the xml data gets displayed so it looks like the code within the each block is not being executed. What am i doing wrong? -- View this message in context: http://www.nabble.com/jquery-code-works-with-firefox-but-not-ie.-tp19745367s27240p24620816.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Superfish speed problem
Hi there, I'm trying to get my Superfish menu to display the instant that I hover over it. However there is a slight pause before the sub-menu is displayed. I am using supersubs as well, this is the set-up call I am using. $(document).ready(function(){ $('ul.sf-menu').supersubs({ minWidth:12, maxWidth:27, extraWidth: 1 }).superfish({ onInit:function(){}, onBeforeShow: function(){}, onShow:function(){}, onHide:function(){}, delay : 200, animation : {height:'show'}, speed : 1 }) }); I would like it to work as quickly as the one on this site: http://www.salesforce.com/ but when I add a jQuery .hover function on the top menu items, to set a background css style on the top level a elements, the hover style gets applied a (significant) fraction BEFORE the sub-menu for that element is expanded. Anyone got any ideas on how to expand the sub-menus instantly? Thanks! Ben P.S. many thanks to Joel Birch for this great nav system! Ben Houghton m: 07880 520265
[jQuery] Re: extend an Object
thats exactly it!! What is exactly '$' ? its not the same as 'jQuery'. Do you have a link to a doc ? thnx a lot! On Jul 23, 2:23 am, Jules jwira...@gmail.com wrote: Something like this? function person(name, address) { this.name = name; this.address = address; this.whoAmI = function() { if (this.creditLimit) alert(this.name + ' address:' + this.address + 'credit limit:' + this.creditLimit); else alert(this.name + ' address:' + this.address); } return this; } function customer() { this.creditLimit = 0; this.creditCheck = creditCheck; return this; function creditCheck() { alert(this.creditLimit); } } var a = new person('john smith', '10 main st'); var cust = new customer(); a.whoAmI(); $.extend(a, cust); a.creditLimit = 1000; a.whoAmI(); On Jul 22, 10:02 pm, jeanluca lca...@gmail.com wrote: Hi All I tried to add functions to an object like function User(n, a) { this.name = n ; this.aux = a ; } function auxis() { alert(this.aux); } $(document).ready( function() { var u = new User(Jack) ; u.extend({ whoami: function() { alert(this.name); }, autis: auxis }) ; u.whoami() ; }) ; Eventually I will have 2 object A and B and I want to merge A into B: B.exend(A) ; However it doesn't work at all. Any suggestions how to fix this ?
[jQuery] Re: Parsing a complicated JSON file with JQUERY !
its returning me an OBJECT OBJECT i have four levels down ...is there something wrong due to my firewall or anything. ..its not able to access the url or something??? On Thu, Jul 23, 2009 at 5:03 AM, MorningZ morni...@gmail.com wrote: $.getJSON( url_of_json_request, function(json) { $.each(json, function(i) { json[i] // current top level index }) } ) On Jul 22, 7:30 pm, Ajay Sharma sharmaa...@gmail.com wrote: even am having issue with a simple GET request using the GETJSON method...could anyone please provide me with the sample code ? On Thu, Jul 23, 2009 at 4:58 AM, MorningZ morni...@gmail.com wrote: I want to parse it with jquery , I searched in the web but it's seems my json file is a bite complicated What is that supposed to mean? *what do you want to accomplish?* i want to parse doesn't really mean anything and other than there are a lot of characters, there's nothing overly complicated about it the $.each method will walk key/value pairs and the array members of the object (and that's all that is, an object, there's nothing more complex than that) On Jul 22, 6:18 pm, James james.gp@gmail.com wrote: What exactly do you want to do? How is the JSON content stored? In a separate file? On the document? Is it introduced through jQuery's getJSON()? Is it stored as a string in some variable? On Jul 22, 5:17 am, Abraham Boray abrahambo...@gmail.com wrote: As U can see guys , I got that json structure , I want to parse it with jquery , I searched in the web but it's seems my json file is a bite complicated :S here is the picture more clear thatn the file down ! http://www.zshare.net/image/63013802b34a7372/ Here is my plane JSON file [{Post:{id:1,category_id:1,title:CSS Mastering,date:2009-07-21 22:40:00,content:How 2 CSS Master in 5 Days :D ,This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: ,visible:1},Category:{id:1,name:CSS,Post: [{id:1,category_id:1,title:CSS Mastering,date:2009-07-21 22:40:00,content:How 2 CSS Master in 5 Days :D ,This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: ,visible:1,Category:{id:1,name:CSS},Comment: [{id:2,post_id:1,date:2009-07-22 14:10:00,content:Nice TUTO ,Keep it up Dude!,userName:Reda,a_url:http:\/\/ k...@hani.bikhir,e_mail:ma...@gmailika.hy,showMail:1}, {id:6,post_id:1,date:2009-07-22 14:38:00,content:Nice TUTO ,Keep it up Dude!,userName:reda,a_url:http:\/\/ url.com,e_mail:m...@mail.fr,showMail:1}]}, {id:2,category_id:1,title:Beginning CSS,date:2009-07-21 22:41:00,content:Courses 4 Dummies . Beginning
[jQuery] Text manipulation : retrieve tag
Hello, I have an HTML text with text and tags I'd like to get only the text between the tags title Then I have this: body start text titleText to get/title end text /body i'd like to have this result ONLY: Text to get How can I do this ? Thanks,
[jQuery] Re: extend an Object
I just noticed that $ and the jQuery object are the same thing!! On Jul 23, 10:27 am, jeanluca lca...@gmail.com wrote: thats exactly it!! What is exactly '$' ? its not the same as 'jQuery'. Do you have a link to a doc ? thnx a lot! On Jul 23, 2:23 am, Jules jwira...@gmail.com wrote: Something like this? function person(name, address) { this.name = name; this.address = address; this.whoAmI = function() { if (this.creditLimit) alert(this.name + ' address:' + this.address + 'credit limit:' + this.creditLimit); else alert(this.name + ' address:' + this.address); } return this; } function customer() { this.creditLimit = 0; this.creditCheck = creditCheck; return this; function creditCheck() { alert(this.creditLimit); } } var a = new person('john smith', '10 main st'); var cust = new customer(); a.whoAmI(); $.extend(a, cust); a.creditLimit = 1000; a.whoAmI(); On Jul 22, 10:02 pm, jeanluca lca...@gmail.com wrote: Hi All I tried to add functions to an object like function User(n, a) { this.name = n ; this.aux = a ; } function auxis() { alert(this.aux); } $(document).ready( function() { var u = new User(Jack) ; u.extend({ whoami: function() { alert(this.name); }, autis: auxis }) ; u.whoami() ; }) ; Eventually I will have 2 object A and B and I want to merge A into B: B.exend(A) ; However it doesn't work at all. Any suggestions how to fix this ?
[jQuery] Re: extend an Object
I just noticed that $ and the jQuery object are the same thing!! On Jul 23, 10:27 am, jeanluca lca...@gmail.com wrote: thats exactly it!! What is exactly '$' ? its not the same as 'jQuery'. Do you have a link to a doc ? thnx a lot! On Jul 23, 2:23 am, Jules jwira...@gmail.com wrote: Something like this? function person(name, address) { this.name = name; this.address = address; this.whoAmI = function() { if (this.creditLimit) alert(this.name + ' address:' + this.address + 'credit limit:' + this.creditLimit); else alert(this.name + ' address:' + this.address); } return this; } function customer() { this.creditLimit = 0; this.creditCheck = creditCheck; return this; function creditCheck() { alert(this.creditLimit); } } var a = new person('john smith', '10 main st'); var cust = new customer(); a.whoAmI(); $.extend(a, cust); a.creditLimit = 1000; a.whoAmI(); On Jul 22, 10:02 pm, jeanluca lca...@gmail.com wrote: Hi All I tried to add functions to an object like function User(n, a) { this.name = n ; this.aux = a ; } function auxis() { alert(this.aux); } $(document).ready( function() { var u = new User(Jack) ; u.extend({ whoami: function() { alert(this.name); }, autis: auxis }) ; u.whoami() ; }) ; Eventually I will have 2 object A and B and I want to merge A into B: B.exend(A) ; However it doesn't work at all. Any suggestions how to fix this ?
[jQuery] Re: jQuery validation custom method doesn't work
wow thanks it really worked now the element param is kind of useless right? i wonder why it doesn't work :) anyway huge thanks to Jules On Jul 23, 12:05 pm, Jules jwira...@gmail.com wrote: Your code should have been: $.validator.addMethod('myEqual', function (value, element, param) { return value = $(param).val(); // this works know }, 'Please enter a greater year!'); On Jul 23, 12:21 pm, Erwin Purnomo panda...@gmail.com wrote: Hello all I have added a method on jQuery validator like this $.validator.addMethod('myEqual', function (value, element) { return value == element.value; // this one here didn't work :( }, 'Please enter a greater year!'); $.metadata.setType(attr, validate); $(#educationForm).validate({ showErrors: function(errorMap, errorList) { this.defaultShowErrors(); }, errorPlacement: function(error, element) { error.appendTo( element.parent(td).next (td) ); }, /*success: function(label) { label.text(ok!).addClass(success); },*/ rules: { txt_end: { required: true, myEqual: #txt_begin } }, submitHandler: function() { } }); the form looks like this div id=wrapper_form form id=educationForm name=educationForm method=post action= table width=500 border=0 tr td width=100Period:/td td width=200input type=text name=txt_begin id=txt_begin size=8 maxlength=4 class=required year ui-widget- content ui-corner-all / to input type=text name=txt_end id=txt_end size=8 maxlength=4 class=required year ui-widget-content ui-corner-all //td td width=200/td /tr tr td colspan=2 input type=submit name=btn_submit id=btn_submit value=Submit class=ui-button ui-state-default ui-corner-all / input type=button name=btn_cancel id=btn_cancel value=Cancel class=ui-button ui-state-default ui-corner-all / /td td /td /tr /table /form /div but why the custom method I added didn't work? return value == element.value; // this one here didn't work :( it always return true for any value :( am I missing something here? I didn't use the built in method because later in the form I would require to write another method to check for greater or equal and lower or equal ( = and = ) I have tested this method with greater or equal and lower or equal by replacing the == with = or with = It didn't work either
[jQuery] Getting link ID
Hi Guys i have a click event on my links. Each link has an ID. Is there any way I can get the link ID when the user clicks it ? See below for code: a id=menu_home href=#Home/a a id=menu_contact href=#Contact/a //JS $(document).ready(function() { // Add menu event listeners var menuItems = [home, contact]; $.each(menuItems, function(intIndex, nm) { $(#menu_+nm).click(function () { getPage(nm+.htm); }); }); });
[jQuery] Re: Getting link ID
Inside the click event handler, the id's should be available using this.idor $(this).attr('id') Thanks Regards, Dhruva Sagar. Pablo Picassohttp://www.brainyquote.com/quotes/authors/p/pablo_picasso.html - Computers are useless. They can only give you answers. On Thu, Jul 23, 2009 at 4:44 PM, shaf shaolinfin...@gmail.com wrote: Hi Guys i have a click event on my links. Each link has an ID. Is there any way I can get the link ID when the user clicks it ? See below for code: a id=menu_home href=#Home/a a id=menu_contact href=#Contact/a //JS $(document).ready(function() { // Add menu event listeners var menuItems = [home, contact]; $.each(menuItems, function(intIndex, nm) { $(#menu_+nm).click(function () { getPage(nm+.htm); }); }); });
[jQuery] Re: Getting link ID
Thanks. On Jul 23, 12:18 pm, Dhruva Sagar dhruva.sa...@gmail.com wrote: Inside the click event handler, the id's should be available using this.idor $(this).attr('id') Thanks Regards, Dhruva Sagar. Pablo Picassohttp://www.brainyquote.com/quotes/authors/p/pablo_picasso.html - Computers are useless. They can only give you answers. On Thu, Jul 23, 2009 at 4:44 PM, shaf shaolinfin...@gmail.com wrote: Hi Guys i have a click event on my links. Each link has an ID. Is there any way I can get the link ID when the user clicks it ? See below for code: a id=menu_home href=#Home/a a id=menu_contact href=#Contact/a //JS $(document).ready(function() { // Add menu event listeners var menuItems = [home, contact]; $.each(menuItems, function(intIndex, nm) { $(#menu_+nm).click(function () { getPage(nm+.htm); }); }); });
[jQuery] How do a create a loop in my slideshow? (pelase help)
I have create a slide show that has next and previous buttons and an area of 'dots' that link to a specific slide, however I'm having difficulty in looping the sideshow so it runs automatically. Ive tried making a loop function but it seems to act strangely. I'm pretty new to jquery and would really appreciate some help. Code: $(document).ready(function(){ //global fade time var fadetime = 500; //global amout of slides var current = 0; var amountOfSlides = $(#slideshow .slide).size(); //create links for each slide in the dot area var theDots = ; var dotCounter = 0; var firstDot = ' class=current '; $(.slide).each(function(){ theDots = theDots + 'a href= name='+ dotCounter +' ' + firstDot +' /a '; firstDot = ; dotCounter++; }); $(#dot-area).html(theDots); //next button $(#next).live(click, function(e){ e.preventDefault(); //make current selector var currentSelector = .slide:eq( + current + ); var currentDotSelector = #dot-area a:eq( + current + ); current = parseInt(current); current = current + 1; if(current == amountOfSlides){ current = 0; } //make next selector var nextSelector = .slide:eq( + current + ); var nextDotSelector = #dot-area a:eq( + current + ); //remove .current from dot and add it to new one $(currentDotSelector).removeClass(current); $(nextDotSelector).addClass(current); //fade out current and fadein next $(currentSelector).fadeOut(fadetime,function() { $(nextSelector).fadeIn(fadetime); }); }); //previous button $(#previous).live(click, function(e){ e.preventDefault(); //make current selector var currentSelector = .slide:eq( + current + ); var currentDotSelector = #dot-area a:eq( + current + ); current = current - 1; if(current 0){ current = (amountOfSlides - 1); } //make next selector var previousSelector = .slide:eq( + current + ); var previousDotSelector = #dot-area a:eq( + current + ); //remove .current from dot and add it to new one $(currentDotSelector).removeClass(current); $(previousDotSelector).addClass(current); //fade out current and fadein next $(currentSelector).fadeOut(fadetime,function() { $(previousSelector).fadeIn(fadetime); }); }); //dot click $(#dot-area a).live(click, function(e){ e.preventDefault(); //current selector var currentSelector = .slide:eq( + current + ); var currentDotSelector = #dot-area a:eq( + current + ); //the one to fade to current = $(this).attr(name); var dotSlide = .slide:eq( + current + ); var newDotSelector = #dot-area a:eq( + current + ); //remove .current from dot and add it to new one $(currentDotSelector).removeClass(current); $(newDotSelector).addClass(current); $(currentSelector).fadeOut(fadetime,function() { $(dotSlide).fadeIn(fadetime); }); }); //begin loop function slideshowLoop(){ //make current selector var currentSelector = .slide:eq( + current + ); var currentDotSelector = #dot-area a:eq( + current + ); current = parseInt(current); current = current + 1; if(current == amountOfSlides){ current = 0; } //make next selector var nextSelector = .slide:eq( + current + ); var nextDotSelector = #dot-area a:eq( + current + ); //remove .current from dot and add it to new one $(currentDotSelector).removeClass(current); $(nextDotSelector).addClass(current); //fade out current and fadein next $(currentSelector).fadeOut(fadetime,function() { $(nextSelector).fadeIn(fadetime).fadeTo(3000, 1); slideshowLoop() }); } slideshowLoop(); }); Any help would be much appreciated. Cheers.
[jQuery] Re: Toggle Div Based on Value
use an if statement, if value == retired, do this evanbu...@gmail.com wrote: Hi I'm not sure how to approach this. I want to toggle each div with a checkbox or hyperlink which shows/hides every div where the RelStatus value = 'retired'. I'm able to see the value of each RelStatus value using the code below. The id of each div and the RelStatus value of each span is set server-side. Thanks script type=text/javascript $(document).ready(function() { $('#table1 .RelStatus').each(function() { alert($(this).text()); }); }); /script div id=%# Eval(id_individual) % class=IndividualDirectors span class=RelStatus id=RelStatusasp:Label ID=lblRelStatus Text='%# Eval(RelStatus) %' Runat=Server// spanbr / /div
[jQuery] Re: Text manipulation : retrieve tag
I don't believe title tag is valid in body tag however regardless of tag placement try this alert($('title').text()); Kris-I wrote: Hello, I have an HTML text with text and tags I'd like to get only the text between the tags title Then I have this: body start text titleText to get/title end text /body i'd like to have this result ONLY: "Text to get" How can I do this ? Thanks,
[jQuery] Re: Text manipulation : retrieve tag
In fact all the text/code is in a variable, it's not display on the screen. The page is more like this : html*strong text* head titleMyMessage/title style body {font-family:Verdana;font-weight:normal;font-size: . 7em;color:black;} /style /head body bgcolor=white spanH1Server Error in '/' Application.hr width=100% size=1 color=silver/H1 h2 iMyMessage/i /h2/span b Exception Details: /bSystem.Exception: MyMessagebrbr /body On Jul 23, 1:41 pm, Charlie charlie...@gmail.com wrote: I don't believe title tag is valid in body tag however regardless of tag placement try this alert($('title').text());
[jQuery] Re: Parsing a complicated JSON file with JQUERY !
as it should ! and that isn't the string/data that you are returning, as you are probably doing an alert to see your data... which is not going to work as the $.getJSON automatically turns your string value into an Object this stripped down simple example shows the same thing htmlbody script type=text/javascript var x = { a: 1, b: 2 }; //- Json object alert(x); //will show [object Object] /script /body/html I think your issue is with this statement from a few posts ago even am having issue with a simple GET request using the GETJSON method the getJSON is not a simple GET request, it's a GET request that *in addition to* getting the ajax call's value, it also transforms it from a string to an object On Jul 23, 5:30 am, Ajay Sharma sharmaa...@gmail.com wrote: its returning me an OBJECT OBJECT i have four levels down ...is there something wrong due to my firewall or anything. ..its not able to access the url or something??? On Thu, Jul 23, 2009 at 5:03 AM, MorningZ morni...@gmail.com wrote: $.getJSON( url_of_json_request, function(json) { $.each(json, function(i) { json[i] // current top level index }) } ) On Jul 22, 7:30 pm, Ajay Sharma sharmaa...@gmail.com wrote: even am having issue with a simple GET request using the GETJSON method...could anyone please provide me with the sample code ? On Thu, Jul 23, 2009 at 4:58 AM, MorningZ morni...@gmail.com wrote: I want to parse it with jquery , I searched in the web but it's seems my json file is a bite complicated What is that supposed to mean? *what do you want to accomplish?* i want to parse doesn't really mean anything and other than there are a lot of characters, there's nothing overly complicated about it the $.each method will walk key/value pairs and the array members of the object (and that's all that is, an object, there's nothing more complex than that) On Jul 22, 6:18 pm, James james.gp@gmail.com wrote: What exactly do you want to do? How is the JSON content stored? In a separate file? On the document? Is it introduced through jQuery's getJSON()? Is it stored as a string in some variable? On Jul 22, 5:17 am, Abraham Boray abrahambo...@gmail.com wrote: As U can see guys , I got that json structure , I want to parse it with jquery , I searched in the web but it's seems my json file is a bite complicated :S here is the picture more clear thatn the file down ! http://www.zshare.net/image/63013802b34a7372/ Here is my plane JSON file [{Post:{id:1,category_id:1,title:CSS Mastering,date:2009-07-21 22:40:00,content:How 2 CSS Master in 5 Days :D ,This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: ,visible:1},Category:{id:1,name:CSS,Post: [{id:1,category_id:1,title:CSS Mastering,date:2009-07-21 22:40:00,content:How 2 CSS Master in 5 Days :D ,This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: This association creation and destruction is done using the CakePHP model bindModel() and unbindModel() methods. (There is also a very helpful behavior called \Containable\, please refer to manual section about Built-in behaviors for more information). Let's set up a few models so we can see how bindModel() and unbindModel() work. We'll start with two models: This association creation and destruction is done using the CakePHP
[jQuery] JQuery listnav plugin not working correctly for me
I am trying to get listnav to work for me but so far all I have managed to get is the boxes with the name (trying to do demo 4) http://www.cascade-usa.com/default.aspx?page=customerfile=customer/caorsu/customerpages/salesflyer.html The alphabet at the top isn't showing, I don' tknow if I am missing code or what. Thanks.
[jQuery] JQUERY ListNav, can't figure how to make it work
http://www.cascade-usa.com/default.aspx?page=customerfile=customer/caorsu/customerpages/salesflyer.html# I am trying to do it here but I am not getting the nav at the top, I am just getting them in the squares. I am not sure what exactly I am doing wrong.
[jQuery] Image display using jquery
Hi, I have a problem in a div displaying number of images and it is implemented using jquery. This div contains a scrolling option also. With out any scrolling, when I click on any image at the bottom part that is not fully visible, then it's popup will display partially now. But I need an option for displaying this popup to the top(that means it will display fully). can you give me a solution for solve this problem. Thanks and regards
[jQuery] Re: Hiding the cancel button in Ratings plugin, v.3.12
Hi Lee, I found that uncommenting and setting the option 'required' to true on line 332 did just this. Of course, remember to add in the required comma at the end of line 328 to delimit the array options correctly. Thanks Chris On Jun 24, 12:13 pm, leefw lee.francis.wilhelm...@gmail.com wrote: Hi Right to the point: I don't want to use the cancel button functionality of the ratings plugin (version 3.12) so I don't want it showing in front of the stars. I was expecting to find a configuration setting for this, but didn't (did I miss it)? I added a line [control.cancel.hide()] to the draw() function in the source code on line 256 which did the trick, but I was wondering if there is a better way to do this (preferably through configuration)? My source code now looks like this: 251 252 else 253 $(control.inputs).removeAttr('checked'); 254 // Show/hide 'cancel' button 255 control.cancel[control.readOnly || control.required?'hide':'show'] (); 256 control.cancel.hide(); 257 // Add/remove read-only classes to remove hand pointer 258 this.siblings()[control.readOnly?'addClass':'removeClass']('star- rating-readonly'); 259 }, // $.fn.rating.draw 257 ... Anyone? Regards Lee Francis
[jQuery] validate - Change the message language
How do I change the language for the messages being displayed ones an error in a form is found? Just as an example, say I have Swedish and English at a site and load validate on both pages. How do I set the language correctly?
[jQuery] jPrintArea
Hello, i have strange problem with this plugin ( jquery.jPrintArea ) in IE... With FF, Opera and Chrome is work pretty good! But in IE print container is not exactly what i defined... Can u help me? 10x
[jQuery] Re: Does any one know of a page that uses GalleryView 2.0?
i set up a test page here that uses it http://www.umc.org/site/apps/nlnet/content3.aspx?c=lwL4KnN1LtHb=5288617ct=7169361 On Jul 19, 9:09 am, liquidcomma jus...@liquidcomma.com wrote: Hi, Since all the doucmentatio refers to the earlier version of GalleryView, does any one know of a page that uses GalleryView 2.0? To see an example of it in action. Thanks. Justin
[jQuery] Combining jQuery Objects
Does anyone know if it is possible to join two jQuery objects to make a new object. For example... var e1 = $(#firstObject); var e2 = $(#secondObject); var combined = e1.add(e2); // This is the expression I'm looking for Thanks.
[jQuery] pause jQuery.
Hi, I created a sub-navigation menu for a site I've been working on and the thing works perfectly in my opinion... well, near perfectly. When I move my mouse from one main navigation link to the other, the .slideUp and .slideDown properties still work, which is annoying because your essentially having to wait to use the sub-navigation again, even if it is only a few milliseconds. I was wondering if there was a way I could freeze the jQuery until I moved off the (for lack of a better description) links that activate the sub-nav. Below is links to my code: HTML: http://tinypaste.com/98d643c jQuery: http://tinypaste.com/0b05837
[jQuery] jquery
when i am submitting the form with jquery, it's not checking for the entire form, it is checking only the first label, that too how many times i am pressing submit button that many times that error label is printing how to avoid this, and how to do entire form validationon submit.
[jQuery] Re: jquery
I'm sorry, I really didn't understand what you were asking/telling here. Also, can you please provide a more concrete example, as well as any code that will help us figure out your problem? Thanks cheers Michael Lawson Development Lead, Global Solutions, ibm.com Phone: 1-276-206-8393 E-mail: mjlaw...@us.ibm.com 'Whether one believes in a religion or not, and whether one believes in rebirth or not, there isn't anyone who doesn't appreciate kindness and compassion..' From: rama ramadobb...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 07/23/2009 08:26 AM Subject:[jQuery] jquery when i am submitting the form with jquery, it's not checking for the entire form, it is checking only the first label, that too how many times i am pressing submit button that many times that error label is printing how to avoid this, and how to do entire form validationon submit. inline: graycol.gifinline: ecblank.gif
[jQuery] Re: validate - Change the message language
You include the js file for the language of the page. Load no additional file for english, and messages_se.js for swedish. There is no support to load two locales at once and switch after page load. You could hack that by putting the swedish properties into a different variable, then modifying $.validator.messages at runtime. Jörn On Thu, Jul 23, 2009 at 1:25 PM, Mats Hellmanmatsh...@gmail.com wrote: How do I change the language for the messages being displayed ones an error in a form is found? Just as an example, say I have Swedish and English at a site and load validate on both pages. How do I set the language correctly?
[jQuery] Re: validate - Change the message language
so adding script type=text/javascript src=script/messages_se.js/script should load the swedish messages instead of the english ones? And using PHP to check $lang and output nothing for english and the statement above for swedish should be enough. On Thu, Jul 23, 2009 at 3:35 PM, Jörn Zaeffererjoern.zaeffe...@googlemail.com wrote: You include the js file for the language of the page. Load no additional file for english, and messages_se.js for swedish. There is no support to load two locales at once and switch after page load. You could hack that by putting the swedish properties into a different variable, then modifying $.validator.messages at runtime. Jörn On Thu, Jul 23, 2009 at 1:25 PM, Mats Hellmanmatsh...@gmail.com wrote: How do I change the language for the messages being displayed ones an error in a form is found? Just as an example, say I have Swedish and English at a site and load validate on both pages. How do I set the language correctly?
[jQuery] Re: validate - Change the message language
Yes. Got it now. Thanks! On Thu, Jul 23, 2009 at 3:35 PM, Jörn Zaeffererjoern.zaeffe...@googlemail.com wrote: You include the js file for the language of the page. Load no additional file for english, and messages_se.js for swedish. There is no support to load two locales at once and switch after page load. You could hack that by putting the swedish properties into a different variable, then modifying $.validator.messages at runtime. Jörn On Thu, Jul 23, 2009 at 1:25 PM, Mats Hellmanmatsh...@gmail.com wrote: How do I change the language for the messages being displayed ones an error in a form is found? Just as an example, say I have Swedish and English at a site and load validate on both pages. How do I set the language correctly?
[jQuery] Re: pause jQuery.
idea of "freezing" jQuery not making a lot of sense. What you did to post code is great, however there's an even better way, put it in jsBin. jSBin will include jQuery for you and give a working copy of your code to share, instead of it being in 2 places with no CSS. Perhaps if you explained the problem as it relates to menu instead of freeze jQuery would help. Other than that will simply hiding the subs instead of timed slideUp help? alexrogahn wrote: Hi, I created a sub-navigation menu for a site I've been working on and the thing works perfectly in my opinion... well, near perfectly. When I move my mouse from one main navigation link to the other, the .slideUp and .slideDown properties still work, which is annoying because your essentially having to wait to use the sub-navigation again, even if it is only a few milliseconds. I was wondering if there was a way I could "freeze" the jQuery until I moved off the (for lack of a better description) links that activate the sub-nav. Below is links to my code: HTML: http://tinypaste.com/98d643c jQuery: http://tinypaste.com/0b05837
[jQuery] Re: Image display using jquery
anyone reading this can only guess how your image gallery is constructed. Can you provide link to demonstrate your problem, and to see code used? sintu wrote: Hi, I have a problem in a div displaying number of images and it is implemented using jquery. This div contains a scrolling option also. With out any scrolling, when I click on any image at the bottom part that is not fully visible, then it's popup will display partially now. But I need an option for displaying this popup to the top(that means it will display fully). can you give me a solution for solve this problem. Thanks and regards
[jQuery] Re: Parsing a complicated JSON file with JQUERY !
Here's a working version to demonstrate (click on the Output tab to see it run): http://jsbin.com/emeta/edit just think of the variable x coming from a $.getJSON call
[jQuery] load(), cache and IE8
I have a table which has an image, an icon and some text in each cell. I can click an icon in the table cell firing a $.get which delinks (deletes) the image from the server. The table is refreshed with a load () call in the callback function. I use the load() call since I'm only interested in loading the table, not the entire page. Everything works perfectly in all browsers except IE8. It seems IE8 keeps the original table in its cache and when I attempt to refresh it with the load() call, IE8 pulls it from the cache. The file which has been delinked from the server magically remains in the cached version of the table. How can I force IE8 to not use the cache on a load() call? Thanks in advance.
[jQuery] Re: load(), cache and IE8
Add a random query string parameter onto the url of the .load() call (see the code for the AutoComplete plugin for an example) On Jul 23, 9:37 am, LexHair jdpugl...@hotmail.com wrote: I have a table which has an image, an icon and some text in each cell. I can click an icon in the table cell firing a $.get which delinks (deletes) the image from the server. The table is refreshed with a load () call in the callback function. I use the load() call since I'm only interested in loading the table, not the entire page. Everything works perfectly in all browsers except IE8. It seems IE8 keeps the original table in its cache and when I attempt to refresh it with the load() call, IE8 pulls it from the cache. The file which has been delinked from the server magically remains in the cached version of the table. How can I force IE8 to not use the cache on a load() call? Thanks in advance.
[jQuery] Need to validate Multiple email IDs with Comma Seprated
Hi Guys, Can any one tell me validation ' *Email Validation for multiple emails (comma separated)* ' for textarea. I am writing Regular expression but not able validating the given input with comma :( Please suggest something in JQuery Or Javascript Thanking you Regard Mohd.Tareque
[jQuery] jquery autocomplete with dwr
Hi! first: someone know one great (simple and easy) plugin for jquery for autocomplete/suggestion ? second: someone use this plugin with DWR ? thanks :)
[jQuery] Re: jquery autocomplete with dwr
how to disable firebug. 2009/7/23 reneara...@gmail.com Hi! first: someone know one great (simple and easy) plugin for jquery for autocomplete/suggestion ? second: someone use this plugin with DWR ? thanks :) -- -- - Administrator : Ken Phan Websmater : www.goldengate.com.vn Listen to music is free : www.enghe.info Ajax pagination: www.goldengate.com.vn/pagination jQuery navigation: www.goldengate.com.vn/navigation MP3 Ajax Flash webplayer: www.goldengate.com.vn/mp3 Blog me: http://my.opera.com/kenphan19/blog/ --
[jQuery] Re: pause jQuery.
To explain a little more: When I move from one navigational element to the next the animation restarts, I was wondering if there was a way I could stop this happening so that the sub-nav stays down, until I move off the navigation completely or a navigational element which doesn't activate the sub-nav. I did manage to achieve this by making two divs above and below and beside the navigation bar and then setting a jQuery function like this: $(#div1, #div2, #nav_off).hover(function() { $(#sub_nav).slideUp(200); $(#wrap).animate ({ 'marginTop' : '30px' }, 200); }); However I concluded that it was a little too unsemantic and that there must be a better way of achieving my goal, if there isn't then I guess I'm going to have to go with that method. By the way I've altered the jQuery code so it works with the following plugin http://blog.threedubmedia.com/2008/08/eventspecialhover.html. Just so the sub-nav doesn't go off if the user just quickly moves over the navigation without the intention of actually clicking it. I've uploaded the site here http://tutshelf.com/TutShelf_Beta/ You can find links to sourcefiles in the source code, but if your lazy just got to here: http://tutshelf.com/TutShelf_Beta/js/stuff.js and for the CSS here: http://tutshelf.com/TutShelf_Beta/style.css I couldn't get the code to work with JSBin, sorry :( On Jul 23, 1:59 pm, Charlie charlie...@gmail.com wrote: idea of freezing jQuery not making a lot of sense. What you did to post code is great, however there's an even better way, put it in jsBin. jSBin will include jQuery for you and give a working copy of your code to share, instead of it being in 2 places with no CSS. Perhaps if you explained the problem as it relates to menu instead of freeze jQuery would help. Other than that will simply hiding the subs instead of timed slideUp help? alexrogahn wrote:Hi, I created a sub-navigation menu for a site I've been working on and the thing works perfectly in my opinion... well, near perfectly. When I move my mouse from one main navigation link to the other, the .slideUp and .slideDown properties still work, which is annoying because your essentially having to wait to use the sub-navigation again, even if it is only a few milliseconds. I was wondering if there was a way I could freeze the jQuery until I moved off the (for lack of a better description) links that activate the sub-nav. Below is links to my code: HTML:http://tinypaste.com/98d643cjQuery:http://tinypaste.com/0b05837
[jQuery] slide effects not working.
Hello Guys, I've got a couple of div's one of which I'm trying to set a slide effect on when the other is toggled, both contain a single image. The code example can be found here http://pastebin.com/m6c3f43a8 Now, the 'expandable' div is hidden when the page loads as I would expect however clicking on the 'expander' div doesnt appear to trigger any change in the 'expandable' div, also no JS error is thrown. Any ideas on this? I'd appreciate it. Rob
[jQuery] Re: jquery autocomplete with dwr
sorry... i am beginner :) take it easy ;) On Jul 23, 2009 11:08am, Ken kenpha...@gmail.com wrote: how to disable firebug. 2009/7/23 reneara...@gmail.com Hi! first: someone know one great (simple and easy) plugin for jquery for autocomplete/suggestion ? second: someone use this plugin with DWR ? thanks :) -- -- - Administrator : Ken Phan Websmater : www.goldengate.com.vn Listen to music is free : www.enghe.info Ajax pagination: www.goldengate.com.vn/pagination jQuery navigation: www.goldengate.com.vn/navigation MP3 Ajax Flash webplayer: www.goldengate.com.vn/mp3 Blog me: http://my.opera.com/kenphan19/blog/ --
[jQuery] Re: pause jQuery.
Take a look at the hoverIntent plugin. It might do exactly what you need. http://cherne.net/brian/resources/jquery.hoverIntent.html
[jQuery] jquery.dropShadow and IE8
Has any one noticed that the dropshadows dont fade in ie8 they are just black
[jQuery] Re: pause jQuery.
hmmm ththat's quite interesting as the plugin I'm currently using claims to be better than hoverIntent. Perhaps it is not :P On Jul 23, 3:35 pm, jlcox jl...@goodyear.com wrote: Take a look at the hoverIntent plugin. It might do exactly what you need. http://cherne.net/brian/resources/jquery.hoverIntent.html
[jQuery] Re: Toggle Div Based on Value
Right, but how do I associate the span tag which contains the value = 'Retired' with the div that contains it? In other words, I need to toggle the contents of the entire div and not just the span tag. Thanks. On Jul 23, 7:41 am, Liam Potter radioactiv...@gmail.com wrote: use an if statement, if value == retired, do this evanbu...@gmail.com wrote: Hi I'm not sure how to approach this. I want to toggle each div with a checkbox or hyperlink which shows/hides every div where the RelStatus value = 'retired'. I'm able to see the value of each RelStatus value using the code below. The id of each div and the RelStatus value of each span is set server-side. Thanks script type=text/javascript $(document).ready(function() { $('#table1 .RelStatus').each(function() { alert($(this).text()); }); }); /script div id=%# Eval(id_individual) % class=IndividualDirectors span class=RelStatus id=RelStatusasp:Label ID=lblRelStatus Text='%# Eval(RelStatus) %' Runat=Server// spanbr / /div- Hide quoted text - - Show quoted text -
[jQuery] Re: JQUERY ListNav, can't figure how to make it work
It looks like you have the listnav script file loaded three times... this may be causeing it. Prob only need one of these. script type=text/javascript src=/customer/caorsu/customerpages/jquery.listnav-2.0.js/script script type=text/javascript src=/customer/caorsu/customerpages/jquery.listnav.pack-2.0.js/script script type=text/javascript src=/customer/caorsu/customerpages/jquery.listnav.min-2.0.js/script Keith On Wed, Jul 22, 2009 at 5:20 PM, Carinacarinaroche...@gmail.com wrote: http://www.cascade-usa.com/default.aspx?page=customerfile=customer/caorsu/customerpages/salesflyer.html# I am trying to do it here but I am not getting the nav at the top, I am just getting them in the squares. I am not sure what exactly I am doing wrong.
[jQuery] Re: Toggle Div Based on Value
$(span a).click(function(){ var checkValue = $(this).parents(div).attr(value); if (checkValue == 'Retired'){ $(this).parents(div).toggle(); } return false; }); You will see the parents function, this allows you to traverse up the dom. evanbu...@gmail.com wrote: Right, but how do I associate the span tag which contains the value = 'Retired' with the div that contains it? In other words, I need to toggle the contents of the entire div and not just the span tag. Thanks. On Jul 23, 7:41 am, Liam Potter radioactiv...@gmail.com wrote: use an if statement, if value == retired, do this evanbu...@gmail.com wrote: Hi I'm not sure how to approach this. I want to toggle each div with a checkbox or hyperlink which shows/hides every div where the RelStatus value = 'retired'. I'm able to see the value of each RelStatus value using the code below. The id of each div and the RelStatus value of each span is set server-side. Thanks script type=text/javascript $(document).ready(function() { $('#table1 .RelStatus').each(function() { alert($(this).text()); }); }); /script div id=%# Eval(id_individual) % class=IndividualDirectors span class=RelStatus id=RelStatusasp:Label ID=lblRelStatus Text='%# Eval(RelStatus) %' Runat=Server// spanbr / /div- Hide quoted text - - Show quoted text -
[jQuery] Re: load(), cache and IE8
Works like a champ!! Thanks so much. On Jul 23, 9:48 am, MorningZ morni...@gmail.com wrote: Add a random query string parameter onto the url of the .load() call (see the code for the AutoComplete plugin for an example) On Jul 23, 9:37 am, LexHair jdpugl...@hotmail.com wrote: I have a table which has an image, an icon and some text in each cell. I can click an icon in the table cell firing a $.get which delinks (deletes) the image from the server. The table is refreshed with a load () call in the callback function. I use the load() call since I'm only interested in loading the table, not the entire page. Everything works perfectly in all browsers except IE8. It seems IE8 keeps the original table in its cache and when I attempt to refresh it with the load() call, IE8 pulls it from the cache. The file which has been delinked from the server magically remains in the cached version of the table. How can I force IE8 to not use the cache on a load() call? Thanks in advance.
[jQuery] Re: pause jQuery.
Nope, that plugin only does what I've already set up. I've already got the delay set up. Thanks for the suggestion though ^^ On Jul 23, 3:38 pm, alexrogahn alexrog...@googlemail.com wrote: hmmm ththat's quite interesting as the plugin I'm currently using claims to be better than hoverIntent. Perhaps it is not :P On Jul 23, 3:35 pm, jlcox jl...@goodyear.com wrote: Take a look at the hoverIntent plugin. It might do exactly what you need. http://cherne.net/brian/resources/jquery.hoverIntent.html
[jQuery] Re: Toggle Div Based on Value
Very cool. This is what I have now but it only hides the first div containing the RelStatus value = 'Retired' script type=text/javascript $(document).ready(function() { $(#chkIncludeRetired).click(function() { $('#table1.RelStatus').each(function() { var RelStatusValue = $(this).text(); if (RelStatusValue == 'Retired') { $(this).parents(div).toggle(); } }) }); }); /script On Jul 23, 10:47 am, Liam Potter radioactiv...@gmail.com wrote: $(span a).click(function(){ var checkValue = $(this).parents(div).attr(value); if (checkValue == 'Retired'){ $(this).parents(div).toggle(); } return false; }); You will see the parents function, this allows you to traverse up the dom. evanbu...@gmail.com wrote: Right, but how do I associate the span tag which contains the value = 'Retired' with the div that contains it? In other words, I need to toggle the contents of the entire div and not just the span tag. Thanks. On Jul 23, 7:41 am, Liam Potter radioactiv...@gmail.com wrote: use an if statement, if value == retired, do this evanbu...@gmail.com wrote: Hi I'm not sure how to approach this. I want to toggle each div with a checkbox or hyperlink which shows/hides every div where the RelStatus value = 'retired'. I'm able to see the value of each RelStatus value using the code below. The id of each div and the RelStatus value of each span is set server-side. Thanks script type=text/javascript $(document).ready(function() { $('#table1 .RelStatus').each(function() { alert($(this).text()); }); }); /script div id=%# Eval(id_individual) % class=IndividualDirectors span class=RelStatus id=RelStatusasp:Label ID=lblRelStatus Text='%# Eval(RelStatus) %' Runat=Server// spanbr / /div- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text -
[jQuery] Re: Toggle Div Based on Value
I'll need to see your html to see why, but I suspect it's because you targeted a specific id #table1.RelStatus. evanbu...@gmail.com wrote: Very cool. This is what I have now but it only hides the first div containing the RelStatus value = 'Retired' script type=text/javascript $(document).ready(function() { $(#chkIncludeRetired).click(function() { $('#table1.RelStatus').each(function() { var RelStatusValue = $(this).text(); if (RelStatusValue == 'Retired') { $(this).parents(div).toggle(); } }) }); }); /script On Jul 23, 10:47 am, Liam Potter radioactiv...@gmail.com wrote: $(span a).click(function(){ var checkValue = $(this).parents(div).attr(value); if (checkValue == 'Retired'){ $(this).parents(div).toggle(); } return false; }); You will see the parents function, this allows you to traverse up the dom. evanbu...@gmail.com wrote: Right, but how do I associate the span tag which contains the value = 'Retired' with the div that contains it? In other words, I need to toggle the contents of the entire div and not just the span tag. Thanks. On Jul 23, 7:41 am, Liam Potter radioactiv...@gmail.com wrote: use an if statement, if value == retired, do this evanbu...@gmail.com wrote: Hi I'm not sure how to approach this. I want to toggle each div with a checkbox or hyperlink which shows/hides every div where the RelStatus value = 'retired'. I'm able to see the value of each RelStatus value using the code below. The id of each div and the RelStatus value of each span is set server-side. Thanks script type=text/javascript $(document).ready(function() { $('#table1 .RelStatus').each(function() { alert($(this).text()); }); }); /script div id=%# Eval(id_individual) % class=IndividualDirectors span class=RelStatus id=RelStatusasp:Label ID=lblRelStatus Text='%# Eval(RelStatus) %' Runat=Server// spanbr / /div- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text -
[jQuery] Re: pause jQuery.
pretty sure you'll figure solutions out, perhaps absolute position the sub nav so it doesn't push page up and down might look better. Or hover over main nav container to push down the sub nav area, would keep that area until you move away from nav completely alexrogahn wrote: To explain a little more: When I move from one navigational element to the next the animation restarts, I was wondering if there was a way I could stop this happening so that the sub-nav stays down, until I move off the navigation completely or a navigational element which doesn't activate the sub-nav. I did manage to achieve this by making two divs above and below and beside the navigation bar and then setting a jQuery function like this: $("#div1, #div2, #nav_off").hover(function() { $("#sub_nav").slideUp(200); $("#wrap").animate ({ 'marginTop' : '30px' }, 200); }); However I concluded that it was a little too unsemantic and that there must be a better way of achieving my goal, if there isn't then I guess I'm going to have to go with that method. By the way I've altered the jQuery code so it works with the following plugin http://blog.threedubmedia.com/2008/08/eventspecialhover.html. Just so the sub-nav doesn't go off if the user just quickly moves over the navigation without the intention of actually clicking it. I've uploaded the site here http://tutshelf.com/TutShelf_Beta/ You can find links to sourcefiles in the source code, but if your lazy just got to here: http://tutshelf.com/TutShelf_Beta/js/stuff.js and for the CSS here: http://tutshelf.com/TutShelf_Beta/style.css I couldn't get the code to work with JSBin, sorry :( On Jul 23, 1:59pm, Charlie charlie...@gmail.com wrote: idea of "freezing" jQuery not making a lot of sense. What you did to post code is great, however there's an even better way, put it in jsBin. jSBin will include jQuery for you and give a working copy of your code to share, instead of it being in 2 places with no CSS. Perhaps if you explained the problem as it relates to menu instead of freeze jQuery would help. Other than that will simply hiding the subs instead of timed slideUp help? alexrogahn wrote:Hi, I created a sub-navigation menu for a site I've been working on and the thing works perfectly in my opinion... well, near perfectly. When I move my mouse from one main navigation link to the other, the .slideUp and .slideDown properties still work, which is annoying because your essentially having to wait to use the sub-navigation again, even if it is only a few milliseconds. I was wondering if there was a way I could "freeze" the jQuery until I moved off the (for lack of a better description) links that activate the sub-nav. Below is links to my code: HTML:http://tinypaste.com/98d643cjQuery:http://tinypaste.com/0b05837
[jQuery] Re: JQUERY ListNav, can't figure how to make it work
Hm, I took two out but it still is looking the same with out the nav at the top. On Jul 23, 7:45 am, keith westberg keith.westb...@gmail.com wrote: It looks like you have the listnav script file loaded three times... this may be causeing it. Prob only need one of these. script type=text/javascript src=/customer/caorsu/customerpages/jquery.listnav-2.0.js/script script type=text/javascript src=/customer/caorsu/customerpages/jquery.listnav.pack-2.0.js/script script type=text/javascript src=/customer/caorsu/customerpages/jquery.listnav.min-2.0.js/script Keith On Wed, Jul 22, 2009 at 5:20 PM, Carinacarinaroche...@gmail.com wrote: http://www.cascade-usa.com/default.aspx?page=customerfile=customer/c... I am trying to do it here but I am not getting the nav at the top, I am just getting them in the squares. I am not sure what exactly I am doing wrong.- Hide quoted text - - Show quoted text -
[jQuery] Re: Toggle Div Based on Value
I removed some of the server-side code but this is it. thanks script type=text/javascript $(document).ready(function() { $(#chkIncludeRetired).click(function() { $('#table1 .RelStatus').each(function() { var RelStatusValue = $(this).text(); if (RelStatusValue == 'Retired') { $(this).parents(div).toggle(); } }) }); }); /script div id=directors asp:CheckBox ID=chkIncludeRetired runat=server Checked=true / iShow Retired/ibr / div id=%# Eval(id_individual) % class=IndividualDirectors (span class=RelStatus id=RelStatusasp:Label ID=lblRelStatus Text='%# Eval(RelStatus) %' Runat=Server// span)br / /div /div On Jul 23, 11:46 am, Liam Potter radioactiv...@gmail.com wrote: I'll need to see your html to see why, but I suspect it's because you targeted a specific id #table1.RelStatus. evanbu...@gmail.com wrote: Very cool. This is what I have now but it only hides the first div containing the RelStatus value = 'Retired' script type=text/javascript $(document).ready(function() { $(#chkIncludeRetired).click(function() { $('#table1.RelStatus').each(function() { var RelStatusValue = $(this).text(); if (RelStatusValue == 'Retired') { $(this).parents(div).toggle(); } }) }); }); /script On Jul 23, 10:47 am, Liam Potter radioactiv...@gmail.com wrote: $(span a).click(function(){ var checkValue = $(this).parents(div).attr(value); if (checkValue == 'Retired'){ $(this).parents(div).toggle(); } return false; }); You will see the parents function, this allows you to traverse up the dom. evanbu...@gmail.com wrote: Right, but how do I associate the span tag which contains the value = 'Retired' with the div that contains it? In other words, I need to toggle the contents of the entire div and not just the span tag. Thanks. On Jul 23, 7:41 am, Liam Potter radioactiv...@gmail.com wrote: use an if statement, if value == retired, do this evanbu...@gmail.com wrote: Hi I'm not sure how to approach this. I want to toggle each div with a checkbox or hyperlink which shows/hides every div where the RelStatus value = 'retired'. I'm able to see the value of each RelStatus value using the code below. The id of each div and the RelStatus value of each span is set server-side. Thanks script type=text/javascript $(document).ready(function() { $('#table1 .RelStatus').each(function() { alert($(this).text()); }); }); /script div id=%# Eval(id_individual) % class=IndividualDirectors span class=RelStatus id=RelStatusasp:Label ID=lblRelStatus Text='%# Eval(RelStatus) %' Runat=Server// spanbr / /div- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text -
[jQuery] Re: JQUERY ListNav, can't figure how to make it work
yes (only use one of the listnav js files). That and rename this: div id=demoFour class=listNav/div to this: div id=demoFour-nav class=listNav/div - Jack keith westberg wrote: It looks like you have the listnav script file loaded three times... this may be causeing it. Prob only need one of these. script type=text/javascript src=/customer/caorsu/customerpages/jquery.listnav-2.0.js/script script type=text/javascript src=/customer/caorsu/customerpages/jquery.listnav.pack-2.0.js/script script type=text/javascript src=/customer/caorsu/customerpages/jquery.listnav.min-2.0.js/script Keith On Wed, Jul 22, 2009 at 5:20 PM, Carinacarinaroche...@gmail.com wrote: http://www.cascade-usa.com/default.aspx?page=customerfile=customer/caorsu/customerpages/salesflyer.html# I am trying to do it here but I am not getting the nav at the top, I am just getting them in the squares. I am not sure what exactly I am doing wrong.
[jQuery] Re: Toggle Div Based on Value
could you paste the outputted html to jsbin, in the meantime, try this script type=text/javascript $(document).ready(function() { $(#chkIncludeRetired).click(function() { $('.RelStatus').each(function() { var RelStatusValue = $(this).text(); if (RelStatusValue == 'Retired') { $(this).parents(div).toggle(); } }) }); }); /script evanbu...@gmail.com wrote: I removed some of the server-side code but this is it. thanks script type=text/javascript $(document).ready(function() { $(#chkIncludeRetired).click(function() { $('#table1 .RelStatus').each(function() { var RelStatusValue = $(this).text(); if (RelStatusValue == 'Retired') { $(this).parents(div).toggle(); } }) }); }); /script div id=directors asp:CheckBox ID=chkIncludeRetired runat=server Checked=true / iShow Retired/ibr / div id=%# Eval(id_individual) % class=IndividualDirectors (span class=RelStatus id=RelStatusasp:Label ID=lblRelStatus Text='%# Eval(RelStatus) %' Runat=Server// span)br / /div /div On Jul 23, 11:46 am, Liam Potter radioactiv...@gmail.com wrote: I'll need to see your html to see why, but I suspect it's because you targeted a specific id #table1.RelStatus. evanbu...@gmail.com wrote: Very cool. This is what I have now but it only hides the first div containing the RelStatus value = 'Retired' script type=text/javascript $(document).ready(function() { $(#chkIncludeRetired).click(function() { $('#table1.RelStatus').each(function() { var RelStatusValue = $(this).text(); if (RelStatusValue == 'Retired') { $(this).parents(div).toggle(); } }) }); }); /script On Jul 23, 10:47 am, Liam Potter radioactiv...@gmail.com wrote: $(span a).click(function(){ var checkValue = $(this).parents(div).attr(value); if (checkValue == 'Retired'){ $(this).parents(div).toggle(); } return false; }); You will see the parents function, this allows you to traverse up the dom. evanbu...@gmail.com wrote: Right, but how do I associate the span tag which contains the value = 'Retired' with the div that contains it? In other words, I need to toggle the contents of the entire div and not just the span tag. Thanks. On Jul 23, 7:41 am, Liam Potter radioactiv...@gmail.com wrote: use an if statement, if value == retired, do this evanbu...@gmail.com wrote: Hi I'm not sure how to approach this. I want to toggle each div with a checkbox or hyperlink which shows/hides every div where the RelStatus value = 'retired'. I'm able to see the value of each RelStatus value using the code below. The id of each div and the RelStatus value of each span is set server-side. Thanks script type=text/javascript $(document).ready(function() { $('#table1 .RelStatus').each(function() { alert($(this).text()); }); }); /script div id=%# Eval(id_individual) % class=IndividualDirectors span class=RelStatus id=RelStatusasp:Label ID=lblRelStatus Text='%# Eval(RelStatus) %' Runat=Server// spanbr / /div- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text -
[jQuery] Re: Looking for some help converting this to jquery
Thanks Rob I like your approach and learned a lot. This is why I like to post code to see how others attack the same issue. I would still like to see how someone would code this using the jquery syntax rather then the standard javascript way, so if anyone wants to give it a go please do. All us newbies learn a lot from this stuff so thanks again. Daniel
[jQuery] Re: Looking for some help converting this to jquery
function setButtonClass(){ $(':submit,:reset,:button').each(function(){ var el = $(this), val = el.val(), word = (val.split(/[^A-Z\W]/).length/2) + val.length; el.addClass( word = 12 ? 'mb' : (word 4 ? 'sb' : (word 0 ? 'b' : '')) ); }) } Untested, but give it a shot. Should work fine, so long as you execute after document.ready. On Jul 23, 12:38 pm, sleepwalker danielpaulr...@gmail.com wrote: Thanks Rob I like your approach and learned a lot. This is why I like to post code to see how others attack the same issue. I would still like to see how someone would code this using the jquery syntax rather then the standard javascript way, so if anyone wants to give it a go please do. All us newbies learn a lot from this stuff so thanks again. Daniel
[jQuery] Make width of inner div equal outer
Hi all, I've got a problem with IE6 and I need to basically find the width of the header DIV and make the secondLevel DIV match it. So, I guess I need to target IE6 specifically in the code. Here's what I have: div id=header ul id=topNavigation lia href=/Home/a/li li class=selected a href=/About Us/a div class=secondLevel ul lia href=/Overview/a/li /ul /div /li lia href=/Contact/a/li /ul /div I'm not sure how to start with the script. I can calculate the width of the header DIV, but not sure how to force the secondLevel one to match it. alert($(#header).width()); Any help would be fantastic. Cheers Paul
[jQuery] Re: Make width of inner div equal outer
$('.secondLevel').css('width', $('#header').width()); On Jul 23, 1:16 pm, Paul Collins pauldcoll...@gmail.com wrote: Hi all, I've got a problem with IE6 and I need to basically find the width of the header DIV and make the secondLevel DIV match it. So, I guess I need to target IE6 specifically in the code. Here's what I have: div id=header ul id=topNavigation lia href=/Home/a/li li class=selected a href=/About Us/a div class=secondLevel ul lia href=/Overview/a/li /ul /div /li lia href=/Contact/a/li /ul /div I'm not sure how to start with the script. I can calculate the width of the header DIV, but not sure how to force the secondLevel one to match it. alert($(#header).width()); Any help would be fantastic. Cheers Paul
[jQuery] Re: Looking for some help converting this to jquery
Eric you rock that's what I'm talking about!! Beautiful code man thanks so much. Learning is fun. Daniel
[jQuery] Re: HELP: how to browser cache json request?
Hi James, I understand that if they return a 304 headers then that means they are using the cached version... that is what 304 Not Modified means. The problem is that there isn't a 304 Not Modified header when a user visits the page. That only happens after the json is loaded. It is page cached which means that it doesn't get the if-modified-since headers correct until after the json is requested once the page has loaded. This happens every time the page is loaded, not just the first time. This is why I want to browser cache the file. My json file won't change that often, but it will change and when it does I want it to be updated. So for instance if someone visits my page today I want the json to be cached. When they come back in a week I want the if-modified-since headers to be properly assigned to the date they last visited. Currently the if-modified-since header would be set to the default 1970 date each time they initially open the page. So on both visits, they would download a new copy of the json data when they first open the page. I hope that I am clear in my question now, because it seems that I wasn't at first. Is this possible? If so, how? Thanks in advance! On Jul 1, 7:28 pm, James james.gp@gmail.com wrote: If your requests are returning 304 Not Modified, then it means it's using the cached version because the one on the server is not different from the one in the cache. On Jul 1, 1:07 pm, wgordonw1 wgordo...@gmail.com wrote: bump. is it possible to cache something using the ajax call and only download it using last-modified headers? or is that why nobody ever responded?- Hide quoted text - - Show quoted text -
[jQuery] how to call custom function
I dont know how to call the custom javascript function with arguments
[jQuery] [validate]
Hi all, I'm using the jQuery validate plugin. When select boxes don't pass validation, I want them to to be revalidated onChange. I don't see an option for this in the validate() options. Do I have to add it manually to the elements onchange attribute? -Dustin
[jQuery] Re: Validation plugin 1.5.5 error in IE6
I found this link: http://return-true.com/2008/12/fixing-jquery-validator-plugin-in-internet-explorer-6/ Looks like it's a character set issue. -Mario On Jun 29, 4:21 pm, Tristan teastb...@gmail.com wrote: The jquery.validate.pack.js file found onhttp://bassistance.de/jquery-plugins/jquery-plugin-validation/causes an error when run in IE6.
[jQuery] How to append elements with event listener?
I tried to append a table row to a table by clicking on a button. And inside the table, I put a link so i can click that and remove the row. I was using jquery.flydom plugin, by the way. The HTML looks like: HTML== table id=PE_Template tr tha class=removeRow href=#img src=images/12-em- cross.png alt=Delete this row //a/th tdinput type=text name=label id=label0 value= //td tdinput type=text name=weightage id=weightage0 value= / /td tdtextarea name=description id=description0 cols=30 rows=2/textarea/td /tr /table input type=button class=add-row / === ==JS=== $(document).ready(function(){ $(.removeRow).click(function(){ $(this).parents('tr').remove(); return false; }); $(.add-row).click(function(){ $(#PE_Template tbody).createAppend( 'tr',{},[ 'th',{},[ 'a',{className: 'removeRow', href: '#'},[ 'img',{name: 'Delete this row', src: 'images/12-em-cross.png', alt: 'Delete this row'},[], ], ], 'td',{},[ 'input',{type: 'text', name:'label'},[], ], 'td',{},[ 'input',{type: 'text', name:'weightage'},[], ], 'td',{},[ 'textarea',{name:'description', cols:'30', rows:'2'},[], ], ] ); return false; }); }); === I also tried to append the table row with the non-flydom code: ==JS=== $(#PE_Template tbody).append([ tr, th,a class='removeRow' href='#'img name='' src='images/ 12-em-cross.png' alt='Delete this row' //a,/th, tdinput type='text' name='label' value='' //td, tdinput type='text' name='weightage' value='' //td, tdtextarea name='description' cols='30' rows='2'/ textarea/td, /tr ].join()); === But the result is that the rows generated by the JS cannot be removed. Can someone help me solve the problem? Thanks! C1412
[jQuery] Re: Combining jQuery Objects
Do you mean append() or appendTo() ? On Thu, Jul 23, 2009 at 12:17 PM, NeilM neil.mar...@abilitation.com wrote: Does anyone know if it is possible to join two jQuery objects to make a new object. For example... var e1 = $(#firstObject); var e2 = $(#secondObject); var combined = e1.add(e2); // This is the expression I'm looking for Thanks.
[jQuery] Loop with mouse enter / leave events: help needed !
Hi All, I am very new to jquery. Here is a small page I made to get familiar with it: http://www.compu-zen.com/tests/jquery.popup_test.htm Could anybody explain me the following: when mouse cursor is located above the middle of the height of the button image, javascript is looping while sending mouseenter and mouseleave events. When the mouse cursor is below the middle of the height of the button image, it does not happen! Any idea? Thanks for your help. Cheers, EE.
[jQuery] jQuery Cycle pager with images
Hi, I am fairly new to both jWuery and jQuery Cycle, but I have managed to set-up my slideshow using images as the pagers. The problem is that I want to be able to indicate which slide is currently being displayed by toggling the pager image to unique one when it is active. Essentially what I want to do is achieve the same sort of effect as the .activeSlide attribute, but using images instead of CSS. Relevant code below. script type=text/javascript $(function() { $('#topleft').cycle({ fx:'fade', speed: 2500, pager: '#nav', pagerAnchorBuilder: function(idx, slide) { // return sel string for existing anchor return '#nav li:eq(' + (idx) + ') a'; } }); }); $(function() { $('#pauseButton').click(function() { $('#topleft').cycle('pause'); }); $(function() { $('#playButton').click(function() { $('#topleft').cycle('resume'); }); }); }); div id=navbar ul id=nav lia class=cyclebutton href=#img src=img/tab1.gif width=20 height=20/a/li lia class=cyclebutton href=#img src=img/tab2.gif width=20 height=20/a/li lia class=cyclebutton href=#img src=img/tab3.gif width=20 height=20/a/li /ul div id=topleft class=pics a href=http://www.edc.ca/english/insurance.htm;img id=1 src=images1.jpg width=748 height=272/a a href=http://www.edc.ca/english/bonding.htm;img id=2 src=images2.jpg width=748 height=272/a a href=http://www.edc.ca/english/ corporate_domestic_powers.htmimg id=3 src=images3.jpg width=748 height=272/a /div input type=image id=playButton value=pause src=jquery.animated.innerfade/img/play.gif width=20 height=20 input type=image id=pauseButton value=play src=jquery.animated.innerfade/img/pause.gif width=20 height=20 /div
[jQuery] Re: Validation plugin 1.5.5 error in IE6
It would be great if you could post your repacked version for us. Thanks! -Mario
[jQuery] Re: Need to validate Multiple email IDs with Comma Seprated
You can split the Emails with the comma, and then validate them one by one. On Thu, Jul 23, 2009 at 9:49 PM, Mohd.Tareq tareq.m...@gmail.com wrote: Hi Guys, Can any one tell me validation ' *Email Validation for multiple emails (comma separated)* ' for textarea. I am writing Regular expression but not able validating the given input with comma :( Please suggest something in JQuery Or Javascript Thanking you Regard Mohd.Tareque
[jQuery] switching jquery tabs in code behind(C#)
I have five div tags(jquery tabs) in my aspx page...Inside the second div(tab) i have a button. onclick of that buttton the second div(tab) should be switched..instead of that the first tab is coming.. How can i switch the tab in code behind(Inside button onclick event)...
[jQuery] Trying to Validate a Form
Hi, I am currently trying to validate a form before sending it with the jQuery Form Plugin. I can get them working but it is always one or the other, I can't get them both working. The code I have so far is below: script type=text/javascript $('#submit').ajaxForm(function() { alert(Thank you for your comment!); }); $(submit).validate({ submitHandler: function(form) { $(form).ajaxSubmit(); } }) /script If possible, could somebody help?
[jQuery] Re: switching jquery tabs in code behind(C#)
onclick event would be: - in the aspx's code? - on the client? if it is in the code, then any running of that postback code is going to cause a page reload, and consequent defaulting to the first tab by default if you want the new page reload to stay on the current tab, then you would emit some client script (using Page.ClientScript) object to call the Tabs' event that will switch the tab On Jul 23, 9:49 am, noorul noorulameen...@gmail.com wrote: I have five div tags(jquery tabs) in my aspx page...Inside the second div(tab) i have a button. onclick of that buttton the second div(tab) should be switched..instead of that the first tab is coming.. How can i switch the tab in code behind(Inside button onclick event)...
[jQuery] Re: Trying to Validate a Form
You've got an error in the second selector, a missing #. Try this: $(#submit).validate({ submitHandler: function(form) { $(form).ajaxSubmit(); } }); Jörn On Thu, Jul 23, 2009 at 3:22 PM, Nickpoomi...@googlemail.com wrote: Hi, I am currently trying to validate a form before sending it with the jQuery Form Plugin. I can get them working but it is always one or the other, I can't get them both working. The code I have so far is below: script type=text/javascript $('#submit').ajaxForm(function() { alert(Thank you for your comment!); }); $(submit).validate({ submitHandler: function(form) { $(form).ajaxSubmit(); } }) /script If possible, could somebody help?
[jQuery] Re: JQUERY ListNav, can't figure how to make it work
Oh, thank you! that worked. On Jul 23, 9:11 am, Jack Killpatrick j...@ihwy.com wrote: yes (only use one of the listnav js files). That and rename this: div id=demoFour class=listNav/div to this: div id=demoFour-nav class=listNav/div - Jack keith westberg wrote: It looks like you have the listnav script file loaded three times... this may be causeing it. Prob only need one of these. script type=text/javascript src=/customer/caorsu/customerpages/jquery.listnav-2.0.js/script script type=text/javascript src=/customer/caorsu/customerpages/jquery.listnav.pack-2.0.js/script script type=text/javascript src=/customer/caorsu/customerpages/jquery.listnav.min-2.0.js/script Keith On Wed, Jul 22, 2009 at 5:20 PM, Carinacarinaroche...@gmail.com wrote: http://www.cascade-usa.com/default.aspx?page=customerfile=customer/c... I am trying to do it here but I am not getting the nav at the top, I am just getting them in the squares. I am not sure what exactly I am doing wrong.- Hide quoted text - - Show quoted text -
[jQuery] Re: How to append elements with event listener?
Thanks to jukebox42 from jqueryhelp.com. The problem is solved. When you create your table row the remove button doesn’t get any events attached to it since it was created after you declare the event. a way around this is to use the live() function in jquery ( http://docs.jquery.com/Events/live#typefn ) So the remove code should looks like: $(.removeRow).live(click,function(){ $(this).parents('tr').remove(); return false; }); And for the add-row function, we don’t need the following code. Just delete them. $(#removeRow).live(click,function(){ $(this).parents('tr').remove(); return false; }); On Jul 23, 9:45 pm, C1412 conanchou1...@gmail.com wrote: I tried to append a table row to a table by clicking on a button. And inside the table, I put a link so i can click that and remove the row. I was using jquery.flydom plugin, by the way. The HTML looks like: HTML== table id=PE_Template tr tha class=removeRow href=#img src=images/12-em- cross.png alt=Delete this row //a/th tdinput type=text name=label id=label0 value= //td tdinput type=text name=weightage id=weightage0 value= //td tdtextarea name=description id=description0 cols=30 rows=2/textarea/td /tr /table input type=button class=add-row / === ==JS=== $(document).ready(function(){ $(.removeRow).click(function(){ $(this).parents('tr').remove(); return false; }); $(.add-row).click(function(){ $(#PE_Template tbody).createAppend( 'tr',{},[ 'th',{},[ 'a',{className: 'removeRow', href: '#'},[ 'img',{name: 'Delete this row', src: 'images/12-em-cross.png', alt: 'Delete this row'},[], ], ], 'td',{},[ 'input',{type: 'text', name:'label'},[], ], 'td',{},[ 'input',{type: 'text', name:'weightage'},[], ], 'td',{},[ 'textarea',{name:'description', cols:'30', rows:'2'},[], ], ] ); return false; }); }); === I also tried to append the table row with the non-flydom code: ==JS=== $(#PE_Template tbody).append([ tr, th,a class='removeRow' href='#'img name='' src='images/ 12-em-cross.png' alt='Delete this row' //a,/th, tdinput type='text' name='label' value='' //td, tdinput type='text' name='weightage' value='' //td, tdtextarea name='description' cols='30' rows='2'/ textarea/td, /tr ].join()); === But the result is that the rows generated by the JS cannot be removed. Can someone help me solve the problem? Thanks! C1412
[jQuery] Re: Adjusting Superfish menu alignment
you are duplicate loading script files and also trying to use $(document).ready in a jQuery.noConflict environment. If not familiar with noConflict read FAQ's on jQuery site dgaletar wrote: Hello. I love your module! Thank you for developing it. The issue I am having is that my menu is aligning to the right, instead of to the left where the normal menu was. I have worked with the CSS for some time now, but have not been able to figure it out. I would also like to make the menu colors black text with a transparent background, and white text with a #333 background on hover. I could probably figure this one out in the long run, but since I was asking... Any help would be GREATLY appreciated! The web site address is: http://www.gcservices.net/phb-llc/ Thanks, DG
[jQuery] Working with progressbar as a preloader
Hi Guys I want to use the progress bar on the site first load which will basically act like the gmail preloader. The aim is to use an AJAX request which will download the content and the preloader is running at the frontend. Once the content is downloaded the progressbar is removed and the content injected into the html page. My question is how can I code this ?
[jQuery] select all grandchildren of a div
Hey All, I have to select all my grandchildren of parent div. only the grandchildren not either of children or great grandchildren. div id=parent class=parent div id=child class=child div id=grand_child_1 class=grandchild /div div id=great_grand_child_1 class=greatgrandchild /div div id=great_grand_child_2 class=greatgrandchild /div . . . div id=great_grand_child_n class=greatgrandchild /div div id=grand_child_2 class=grandchild / div div id=great_grand_child_1 class=greatgrandchild /div div id=great_grand_child_2 class=greatgrandchild /div . . . div id=great_grand_child_n class=greatgrandchild /div div id=grand_child_3 class=grandchild /div . . . . div id=grand_child_n class=grandchild /div /div /div How can i achieve this using jquery? Thanks in advance regards, krish
[jQuery] Re: select all grandchildren of a div
Assuming the grandchildren all have the class=grandchild attribute, you could use the find() method: $('div.parent').find(.grandchild) On Jul 23, 3:04 pm, Krish senthil@gmail.com wrote: Hey All, I have to select all my grandchildren of parent div. only the grandchildren not either of children or great grandchildren. div id=parent class=parent div id=child class=child div id=grand_child_1 class=grandchild /div div id=great_grand_child_1 class=greatgrandchild /div div id=great_grand_child_2 class=greatgrandchild /div . . . div id=great_grand_child_n class=greatgrandchild /div div id=grand_child_2 class=grandchild / div div id=great_grand_child_1 class=greatgrandchild /div div id=great_grand_child_2 class=greatgrandchild /div . . . div id=great_grand_child_n class=greatgrandchild /div div id=grand_child_3 class=grandchild /div . . . . div id=grand_child_n class=grandchild /div /div /div How can i achieve this using jquery? Thanks in advance regards, krish
[jQuery] [Plugins] New plugin - jqswfupload
Hello everyone, I would like to announce the jqswfupload plugin: http://jqswfupload.alexandremagno.net/ The easier way to make a multiple file upload using swfupload. You can create a complete interface for multiupload files based on Flickr ux in just one line of code and them make custom settings to controll how works all the features. Hope everyone enjoy it! Alexandre Magno Interface Developer http://blog.alexandremagno.net
[jQuery] Re: Loop with mouse enter / leave events: help needed !
The container with the appearing image overlaps the rollover area halfway. I determined this with Firebug by changing the div's style to include background: red. The answer was very clear then. :) On Jul 23, 12:40 pm, eelziere eelzi...@hotmail.com wrote: Hi All, I am very new to jquery. Here is a small page I made to get familiar with it: http://www.compu-zen.com/tests/jquery.popup_test.htm Could anybody explain me the following: when mouse cursor is located above the middle of the height of the button image, javascript is looping while sending mouseenter and mouseleave events. When the mouse cursor is below the middle of the height of the button image, it does not happen! Any idea? Thanks for your help. Cheers, EE.
[jQuery] Re: select all grandchildren of a div
hi amuhlou, thank you for your quick response. with the same assumption is there any possibility to get all grandchildren in the handle property of jquery. On Jul 23, 12:11 pm, amuhlou amysch...@gmail.com wrote: Assuming the grandchildren all have the class=grandchild attribute, you could use the find() method: $('div.parent').find(.grandchild) On Jul 23, 3:04 pm, Krish senthil@gmail.com wrote: Hey All, I have to select all my grandchildren of parent div. only the grandchildren not either of children or great grandchildren. div id=parent class=parent div id=child class=child div id=grand_child_1 class=grandchild /div div id=great_grand_child_1 class=greatgrandchild /div div id=great_grand_child_2 class=greatgrandchild /div . . . div id=great_grand_child_n class=greatgrandchild /div div id=grand_child_2 class=grandchild / div div id=great_grand_child_1 class=greatgrandchild /div div id=great_grand_child_2 class=greatgrandchild /div . . . div id=great_grand_child_n class=greatgrandchild /div div id=grand_child_3 class=grandchild /div . . . . div id=grand_child_n class=grandchild /div /div /div How can i achieve this using jquery? Thanks in advance regards, krish
[jQuery] Insert SWF using JS
Hi Guys I have some JS that flash cs4 generated when I published my swf. I am trying to do some AJAX and download the SWF and then insert it into the page's DIV tag. How can I do this. Code below: AC_FL_RunContent( 'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/ swflash.cab#version=10,0,0,0', 'width', '873', 'height', '247', 'src', 'banner', 'quality', 'high', 'pluginspage', 'http://www.adobe.com/go/getflashplayer', 'play', 'true', 'loop', 'false', 'scale', 'showall', 'wmode', 'transparent', 'devicefont', 'false', 'id', 'banner', 'name', 'banner', 'menu', 'false', 'allowFullScreen', 'false', 'allowScriptAccess','sameDomain', 'movie', 'banner' ); //end AC code
[jQuery] Re: select all grandchildren of a div
I'm not really sure what you are asking. Are you referring to the jQuery ui slider? If so, the jQuery UI google group is probably a better place to ask that question and search for threads where your question may have already been answered. http://groups.google.com/group/jquery-ui On Jul 23, 3:37 pm, Krish senthil@gmail.com wrote: hi amuhlou, thank you for your quick response. with the same assumption is there any possibility to get all grandchildren in the handle property of jquery. On Jul 23, 12:11 pm, amuhlou amysch...@gmail.com wrote: Assuming the grandchildren all have the class=grandchild attribute, you could use the find() method: $('div.parent').find(.grandchild) On Jul 23, 3:04 pm, Krish senthil@gmail.com wrote: Hey All, I have to select all my grandchildren of parent div. only the grandchildren not either of children or great grandchildren. div id=parent class=parent div id=child class=child div id=grand_child_1 class=grandchild /div div id=great_grand_child_1 class=greatgrandchild /div div id=great_grand_child_2 class=greatgrandchild /div . . . div id=great_grand_child_n class=greatgrandchild /div div id=grand_child_2 class=grandchild / div div id=great_grand_child_1 class=greatgrandchild /div div id=great_grand_child_2 class=greatgrandchild /div . . . div id=great_grand_child_n class=greatgrandchild /div div id=grand_child_3 class=grandchild /div . . . . div id=grand_child_n class=grandchild /div /div /div How can i achieve this using jquery? Thanks in advance regards, krish
[jQuery] Re: [Plugins] New plugin - jqswfupload
Very nice man!! Thanks for your contribution. - Original Message - From: alexanmtz alexan...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Sent: Thursday, July 23, 2009 1:19 PM Subject: [jQuery] [Plugins] New plugin - jqswfupload Hello everyone, I would like to announce the jqswfupload plugin: http://jqswfupload.alexandremagno.net/ The easier way to make a multiple file upload using swfupload. You can create a complete interface for multiupload files based on Flickr ux in just one line of code and them make custom settings to controll how works all the features. Hope everyone enjoy it! Alexandre Magno Interface Developer http://blog.alexandremagno.net
[jQuery] Re: Need help with a custom selector to bind ajax callbacks
Anyone? On 20 jul, 12:34, Rodrigo Tassinari de Oliveira rodr...@pittlandia.net wrote: Hello everyone, I'm stuck with an annoying problem in this webapp I'm developing. I've created a small code to be called automagically on every ajax request, which shows a loading... div overlay while the ajax request is being processed. This works fine, and the code used can be seen in this pastie: http://pastie.org/552179 However, we also use the Facebox plugin (http://famspam.com/facebox/) in this app, and we don't want the loading... div overlay to show when a facebox ajax request is triggered (the example link trigger is also on the above pastie), since facebox has it's on loading thing. I can't seem to do that. I binding the ajaxSend and ajaxComplete callbacks to some css selector that would include everything except the facebox links (a[rel*=facebox]), instead of the current $ (document) route, but I failed. Does anyone have any ideas to help me with this? Thanks a lot in advance, Rodrigo.
[jQuery] Re: extend an Object
$ = jQuery It is an alias - Original Message - From: jeanluca lca...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Sent: Thursday, July 23, 2009 4:26 AM Subject: [jQuery] Re: extend an Object I just noticed that $ and the jQuery object are the same thing!! On Jul 23, 10:27 am, jeanluca lca...@gmail.com wrote: thats exactly it!! What is exactly '$' ? its not the same as 'jQuery'. Do you have a link to a doc ? thnx a lot! On Jul 23, 2:23 am, Jules jwira...@gmail.com wrote: Something like this? function person(name, address) { this.name = name; this.address = address; this.whoAmI = function() { if (this.creditLimit) alert(this.name + ' address:' + this.address + 'credit limit:' + this.creditLimit); else alert(this.name + ' address:' + this.address); } return this; } function customer() { this.creditLimit = 0; this.creditCheck = creditCheck; return this; function creditCheck() { alert(this.creditLimit); } } var a = new person('john smith', '10 main st'); var cust = new customer(); a.whoAmI(); $.extend(a, cust); a.creditLimit = 1000; a.whoAmI(); On Jul 22, 10:02 pm, jeanluca lca...@gmail.com wrote: Hi All I tried to add functions to an object like function User(n, a) { this.name = n ; this.aux = a ; } function auxis() { alert(this.aux); } $(document).ready( function() { var u = new User(Jack) ; u.extend({ whoami: function() { alert(this.name); }, autis: auxis }) ; u.whoami() ; }) ; Eventually I will have 2 object A and B and I want to merge A into B: B.exend(A) ; However it doesn't work at all. Any suggestions how to fix this ?
[jQuery] adding click event
Hi Guys I have just inserted some content into my html page and now Im trying to add event listeners for some of the links in the inserted content but nothing happens. Do I need to update something before I can add a click event?
[jQuery] Listnav initial display of no items?
Thank you for this little treasure! Is there a way to do it so that when listnav initially appears on the page, no items are shown? In other words, is there a way to just have the alphabetized index show with no initial display of anything else?
[jQuery] [Plugins] looking for iPhone contacts shortcut
Hello guys, I have a long list or product names and in order to speed up the research I'd like to have the alphabet letters on one side and when the user presses one of them the list scrolls to the first name that starts with that letter. Something like contacts on iPhone. So, before starting to develop it, does anyone knows a plugin that does that? Thanks and have a nice day Sig
[jQuery] Re: adding click event
Can you provide sample code or a link? On 23 jul, 14:47, shaf shaolinfin...@gmail.com wrote: Hi Guys I have just inserted some content into my html page and now Im trying to add event listeners for some of the links in the inserted content but nothing happens. Do I need to update something before I can add a click event?
[jQuery] Re: how to call custom function
hi This link could help http://www.w3schools.com/js/js_functions.asp On 23 jul, 08:41, dhana ddhanasha...@gmail.com wrote: I dont know how to call the custom javascript function with arguments