[jQuery] plugins aren't applied on second call
hi, i've been having an issue with the jPicker and jquerySpinButton plugins. if i apply each plugin to one instance (say, a span) they work fine. however, the next time I do the call, the elements are not modified by the plugin. on the demo page, there should be two spin boxes, and two color selectors. only the top 2 work, the bottom 2 are deformed. code is here: http://www.akbars.net/eurisko/test.html any suggestions? much obliged, imran
[jQuery] jQuery's code first lin e (function(){・・・・・
Hi everyone Know I try to study javascript using jQuery code,but first I do not know why jQuery start with (function(){ What is ( function? Why using (function(){ start jQuery? Thanks in advance. Wang Suya
[jQuery] Re: Front page Slider
no respond ?? On Tue, Jun 9, 2009 at 12:03 AM, Nader dasuki nader...@gmail.com wrote: hello dears . how can i make same as this : http://www.aljazeera.net/Portal/Aspx/GetSiteNews.aspx?SummaryPagePath=/Portal/DefaultSummaryPageSectionName=MainStoriesMainStoryXsl=true regards. -- Eng. Nader Dasuqi Project Manager +9665339217533 -- Eng. Nader Dasuqi Project Manager +9665339217533
[jQuery] Re: jQuery's code first l ine (function(){・・・・・
If you go to jquery.com they have some great introduction docs for learning jQuery. However you can start by reading this email :p Typically developers load javascript between the header tags. The problem with doing this is that the browser may (or will) activate the script before the page is completely loaded. Why is this a problem? Because your script may be trying to access parts of the html page (aka - DOM). If the page isn't fully loaded then the browser maybe get confused on how to handle your script. Thankfully the jQuery library provided a simple (but not exclusive) way to prevent such a problem from occurring. And thus we have the - Dom Ready Function $(document).ready(function () { $(p).text(The DOM is now loaded and can be manipulated.); }); jQuery is all about making javascript FUN! So I guess some of the developers felt the the $(document.ready(function(){}); was a too long of an api. Considering that it's used in just about everything you do with jquery. So they put together a shortcut method - $(function(){ // Ta DA!!! }); One thing that help me understand jquery is that EVERYTHING is a function. And it's ok to have functions inside of functions... in time you'll get use to it. Good luck, Cheers : ) On Jun 9, 2009, at 12:19 AM, wangsuya wrote: Hi everyone Know I try to study javascript using jQuery code,but first I do not know why jQuery start with (function(){ What is ( function? Why using (function(){ start jQuery? Thanks in advance. Wang Suya
[jQuery] Marquee plugin
Hi All , Can u tell me which plugin satisfy me requirement , Like marquee , BACK *IMAGE1 IMAGE2 IMAGE3* NEXT When i click *back* , then i want to move image from *right *to *left *, If i click the *next * i want to move image from *left *to *right *, When i click the *image * , light box must display , Thanks B.S.Bharanikumar -- Regards B.S.Bharanikumar http://php-mysql-jquery.blogspot.com/
[jQuery] Re: listmenu plugin: non-ascii characters
Hi Here is an idea. Made an image to illustrate it. http://img266.imageshack.us/img266/618/listmenuz.png By adding two options like, includeNonAscii: true|false and nonAsciiMenuType: hover|static. As default includeNonAscii is false and things works as it does now. If includeNonAscii is true, then collect all these characters in a second array. If nonAsciiMenuType is hover the submenu with these characters will be shown when hovering the ... tab. If nonAsciiMenuType is static then the submenu will be static under the main menu. On Jun 8, 11:09 pm, Jack Killpatrick j...@ihwy.com wrote: Hi, I considered building something like that in, but decided I didn't know enough about other languages to decide how best to handle them. Thanks for starting the dialog. Does anyone else have any opinion on this? The main thing I'm wondering is whether collecting them all under one nav item would, in some cases, result in *many* things ending up there and not many things left under the individual letters (depends on how many items start with these kinds of chars). Also, I think that # would mean starts with a number to most people, but numbers are already handled via the optional [0-9] nav item. If not #, then what else might make sense? On a related note: does anyone know offhand if high ascii chars like these can be used as CSS class names? I haven't ventured into researching that yet. Thanks, Jack Dave wrote: Hi In the example below there are non ascii characters, and as it is now listmenu just ignores them. Maybe a solution could be to collect them under a # tab. ul id=ulSec_LM_List lia href=#Agilityhunden/a/li lia href=#Aktivitetsbollen/a/li lia href=#BIO Shampoo/a/li lia href=#Oxsvans/a/li lia href=#Pipleksak - Groda/a/li lia href=#Vovex Balsam/a/li lia href=#Ädelsten/a/li lia href=#Ouml;gonsten/a/li /ul Cheers- Hide quoted text - - Show quoted text -
[jQuery] How to know if div opened or closed
Hello everybody !!! I'm opening and closing a div and I would like to know if at a precise moment this div is opened or closed. Something like : $(div).isOpened() = true Thanks in advance
[jQuery] Functions
I have soem code that is seperated. $(document).ready(function(){ });
[jQuery] Functions
I have some code seperated by script: $(document).ready(function(){ code in here function thisismyfunction(){ } }); then later on i have $(document).ready(function(){ thisismyfunction() }); code in here with a call to the function above, but because its seperated it will not call the above function is there a way I can reference the a function outside in another declaration etc many thanks si
[jQuery] Re: plugins aren't applied on second call
Hi, Your HTML is not valid. IDs must be unique - you have used #txtSpin and #color twice. Try renaming the first input box as id=txtSpin1 and the second as id=txtSpin2 Your JavaScript code then becomes much simpler: $('#txtSpin1').SpinButton({min:1}); $('#txtSpin2').SpinButton({min:1}); or if you always want both spin boxes initialised the same then this can be shortened to: $('#txtSpin1, #txtSpin2').SpinButton({min:1}); The same applies to the spans - rename the first id='color1' and the second id='color2'. Rgds Paul On Jun 9, 7:57 am, skunkwerk skunkw...@gmail.com wrote: hi, i've been having an issue with the jPicker and jquerySpinButton plugins. if i apply each plugin to one instance (say, a span) they work fine. however, the next time I do the call, the elements are not modified by the plugin. on the demo page, there should be two spin boxes, and two color selectors. only the top 2 work, the bottom 2 are deformed. code is here:http://www.akbars.net/eurisko/test.html any suggestions? much obliged, imran
[jQuery] Drag and drop Issues, fit my drop!?
Hello guys.. I have recently installed Drag And Drop, and its great, but i stumbled into a problem. Okay the deal is, i got 12 drop divs, and atm 7 drag object, they are the same size. But i want the drag object to fit my drop object on drop, i have been trying everything for MANY hours, but with no luck! I am new at Jquery, so there might be something i missed, ive been playing alot with positioning but its not working! If you need to see the project you can check my site on http://www.patterdale.dk/paradise/inventory.php Though it require a login. I really hope for some help guys, i'm really stuck with this! Share your knowledge with me :) Best regards Martin
[jQuery] Re: How can I move a div around the screen?
i hope this tutorial would help: http://nettuts.com/tutorials/javascript-ajax/inettuts/ On Jun 8, 5:28 pm, marcello marcello.man...@gmail.com wrote: Hello everyone!! I'm new here!!! I'm starting to know how many advantages has JQuery for developers. I'm trying some experiments, and the other day I saw the iGoogle interface, where users can move the gadgets around the screen, and this stuff liked me very much. That's why I want to ask to the community if anybody knows if there is some plugin or library in JQuery to do the same effects and allows the programmer to move a div from one point of the screen to another one and fix it. Thank you!! Cheers!!
[jQuery] jQuery Star Rating Plugin
Hi guys, how can I reset the stars without clicking on the cancel button, like on any other event on the page? is it possible? thank you Karim
[jQuery] Re: How to get option's position
$('option').click(function(){ var index = $('option').index(this) + 1; //index() will return zero based result so plus 1 here }); On Jun 9, 8:23 am, David .Wu chan1...@gmail.com wrote: if I have a menu, how to get the position of the option after I select one of it? for example, if I choose b, and the position should b 2. select optiona/option optionb/option optionc/option /select
[jQuery] Re: Front page Slider
http://blueprintds.com/2009/01/20/top-14-jquery-photo-slideshow-gallery-plugins/ Regards, Toan. On Jun 9, 4:03 am, Nader dasuki nader...@gmail.com wrote: hello dears . how can i make same as this :http://www.aljazeera.net/Portal/Aspx/GetSiteNews.aspx?SummaryPagePath... regards. -- Eng. Nader Dasuqi Project Manager +9665339217533
[jQuery] UI accordion and appending new items
Has anyone been successful in appending new items to the jQuery UI accordion widget? I'm trying all sorts of things, but however I manipulate the items in the accordion (like applying effects, or appending elements), it stops being an accordion. In case of appending, the new items do not act like part of the accordion. Issuing `.accordion()` on the parent after appending does not reactivate the accordion, etc. Any advice is appreciated. -- Branko
[jQuery] Re: Call for contributors: A simple, fast and flexible grid/spreadsheet component.
I too think that we need an example of how to incorporate Ajax/Lazy loading into slickgrid.
[jQuery] Re: Front page Slider
http://blueprintds.com/2009/01/20/top-14-jquery-photo-slideshow-gallery-plugins/ On Jun 9, 4:03 am, Nader dasuki nader...@gmail.com wrote: hello dears . how can i make same as this :http://www.aljazeera.net/Portal/Aspx/GetSiteNews.aspx?SummaryPagePath... regards. -- Eng. Nader Dasuqi Project Manager +9665339217533
[jQuery] Re: jQuery cycle plugin help
I have been using jQuery cycle plugin for a banned with some content that fades in and out in a slideshow sort of thing but I would like to be able to div individually. Rather than saying all instances of #projects become a slide, i would like #project_img, #project_title and #project_description to all be separate, yet i want them all to be look like theyre in sync. I would also want the pause on hover to work for the entire parent div #projects so each div stops fading in/out. If anyone took the time to read that rant, make any sense out of it and can help me out i really appreciate it. You can choose specific elements to be slides rather than all children of the container: http://www.malsup.com/jquery/cycle/slideExpr.html
[jQuery] Re: UI accordion and appending new items
Try to restart the accordion: .accordion(destroy).accordion() Jörn On Tue, Jun 9, 2009 at 8:52 AM, foxbunnybg.bra...@gmail.com wrote: Has anyone been successful in appending new items to the jQuery UI accordion widget? I'm trying all sorts of things, but however I manipulate the items in the accordion (like applying effects, or appending elements), it stops being an accordion. In case of appending, the new items do not act like part of the accordion. Issuing `.accordion()` on the parent after appending does not reactivate the accordion, etc. Any advice is appreciated. -- Branko
[jQuery] same effect on multiple objects with same id
I basically have several buttons that are created dynamically via a db, so I can have 1 to 40 etc. now at the moment I give each one a unique id and a hover code in the loops. see below: loops goes here.. img src=button.jpg alt=button border=0 id=myButton?= $newCode ? / $(document).ready(function(){ $(#myButton?=$newCode ?).hover( function () { $(this).fadeTo('fast', .50); }, function () { $(this).fadeTo('fast', 1.0); } ); }); end loop this works fine but gives me a lot of jquery code as well for each as i also have a click action after it, but thats another matter, what i am after is if i just give it the same id as below then i would like only to have one hover code that would do the effect to all, but at mo it will only do the effect to the first, any ideas? loops goes here.. img src=button.jpg alt=button border=0 id=myButton/ end loop So only this loops and i only need the code below once. $(document).ready(function(){ $(#myButton).hover( function () { $(this).fadeTo('fast', .50); }, function () { $(this).fadeTo('fast', 1.0); } ); }); Many thanks Si
[jQuery] Re: How to know if div opened or closed
Here is part of the code we use to set a min or max image on the collapsed pane ( check the display property of your element var visibility = jQuery(this).css('display'); if (visibility == none) { $image.attr('src', pageurl+max.png); } else { $image.attr('src', pageurl+min.png); } On Tue, Jun 9, 2009 at 12:34 PM, tij_dev tijmas...@googlemail.com wrote: Hello everybody !!! I'm opening and closing a div and I would like to know if at a precise moment this div is opened or closed. Something like : $(div).isOpened() = true Thanks in advance -- Armand Datema CTO SchwingSoft
[jQuery] Re: same effect on multiple objects with same id
Hi you cannot have multiple ids ids are unique you need to use a class name instead . img src=button.jpg alt=button border=0 id=myButton class=hoverbutton/ end loop So only this loops and i only need the code below once. $(document).ready(function(){ $(img.hoverbutton).hover( function () { $(this).fadeTo('fast', .50); }, function () { $(this).fadeTo('fast', 1.0); } ); }); On Tue, Jun 9, 2009 at 12:56 PM, simon si...@uvfx.tv wrote: I basically have several buttons that are created dynamically via a db, so I can have 1 to 40 etc. now at the moment I give each one a unique id and a hover code in the loops. see below: loops goes here.. img src=button.jpg alt=button border=0 id=myButton?= $newCode ? / $(document).ready(function(){ $(#myButton?=$newCode ?).hover( function () { $(this).fadeTo('fast', .50); }, function () { $(this).fadeTo('fast', 1.0); } ); }); end loop this works fine but gives me a lot of jquery code as well for each as i also have a click action after it, but thats another matter, what i am after is if i just give it the same id as below then i would like only to have one hover code that would do the effect to all, but at mo it will only do the effect to the first, any ideas? loops goes here.. img src=button.jpg alt=button border=0 id=myButton/ end loop So only this loops and i only need the code below once. $(document).ready(function(){ $(#myButton).hover( function () { $(this).fadeTo('fast', .50); }, function () { $(this).fadeTo('fast', 1.0); } ); }); Many thanks Si -- Armand Datema CTO SchwingSoft
[jQuery] help for tooltip
hello dears , how can i make same as this tooltip : http://www.alriyadh.com/ see this page at the top , in the above - left side plz help me regards -- Eng. Nader Dasuqi Project Manager +9665339217533
[jQuery] Re: Can jQuery parse XML locally?
Thanks, Kevin - it's nice to know that I'm not alone and not doing anything stupid. I suspect, like you, that it is a security thing, which would be fine if IE actually generated a useful warning or error message. Instead it just doesn't work and generates zilch, nada, niente, bubkes, zip, zero... One of these days Microsoft will get round to producing a real browser, rather than a standards-inimical piece of malware ;-\ Cheers Fred On Jun 5, 3:14 pm, kevinm9876 kevinm9...@gmail.com wrote: I've never been able to get IE to work locally when using jquery to parse XML. I am not sure what it is but I think it is a security thing in IE. Once you put it on a server though, it should work (at least it did for me). On Jun 4, 1:51 pm, fredriley fred.ri...@gmail.com wrote: On Jun 2, 6:42 pm, jsuggs jsu...@gmail.com wrote: Basic answer, yes. If you copied and pasted the example html, then the url parameter references labels.xml, which would have to reside in the same directory as where you saved the html file. Also, don't forget that you also need the jquery file it references as well. So to more succinctly answer you question. You will need to have three files in your local directory. 1) The html file. 2) The jquery file (named jquery.js in that example) 3) The xml file (named labels.xml) That should solve your problem. After further testing, your solution does solve the problem in Firefox and Opera but not in IE. So the test athttp://www.nottingham.ac.uk/~ntzfr/test/ajax/jquery/xml/jquery_xml1.html works fine in Firefox 3 and Opera online and locally with the click here link expanding, but fails locally in IE7 and of course there are no error messages. The following files are in the same directory: jquery_xml1.html jquery.js labels.xml This isn't the first time by far that IE has knackered my JS code (and CSS for that matter), and indeed IE routinely adds 50% or more to my webdev time, but I was hoping that jQuery functions always work cross- browser. I'm aiming towards something likehttp://www.nottingham.ac.uk/~ntzfr/test/ajax/jquery/xml/jquery_xml2.html where links read from a XML file are displayed in an iframe. Any ideas why IE isn't behaving? If I can't get it to behave locally then this project's off :( Cheers Fred
[jQuery] Re: same effect on multiple objects with same id
Why not use a class instead of an id in order to target all buttons? Or alternatively something like: $('img[alt=button]').hover( function () { $(this).fadeTo('fast', .10); }, function () { $(this).fadeTo('fast', 1.0); } ); Maurício -Mensagem Original- De: simon Para: jQuery (English) Enviada em: terça-feira, 9 de junho de 2009 07:56 Assunto: [jQuery] same effect on multiple objects with same id I basically have several buttons that are created dynamically via a db, so I can have 1 to 40 etc. now at the moment I give each one a unique id and a hover code in the loops. see below: loops goes here.. img src=button.jpg alt=button border=0 id=myButton?= $newCode ? / $(document).ready(function(){ $(#myButton?=$newCode ?).hover( function () { $(this).fadeTo('fast', .50); }, function () { $(this).fadeTo('fast', 1.0); } ); }); end loop this works fine but gives me a lot of jquery code as well for each as i also have a click action after it, but thats another matter, what i am after is if i just give it the same id as below then i would like only to have one hover code that would do the effect to all, but at mo it will only do the effect to the first, any ideas? loops goes here.. img src=button.jpg alt=button border=0 id=myButton/ end loop So only this loops and i only need the code below once. $(document).ready(function(){ $(#myButton).hover( function () { $(this).fadeTo('fast', .50); }, function () { $(this).fadeTo('fast', 1.0); } ); }); Many thanks Si
[jQuery] Re: How to know if div opened or closed
Thanks a lot I'll try that :) On 9 juin, 13:19, Armand Datema nok...@gmail.com wrote: Here is part of the code we use to set a min or max image on the collapsed pane ( check the display property of your element var visibility = jQuery(this).css('display'); if (visibility == none) { $image.attr('src', pageurl+max.png); } else { $image.attr('src', pageurl+min.png); } On Tue, Jun 9, 2009 at 12:34 PM, tij_dev tijmas...@googlemail.com wrote: Hello everybody !!! I'm opening and closing a div and I would like to know if at a precise moment this div is opened or closed. Something like : $(div).isOpened() = true Thanks in advance -- Armand Datema CTO SchwingSoft
[jQuery] Safari and Chrome code execution problem
Hi, I'm developing with jQuery quite long right now, but recently I spotted one big problem with execution of jQuery code in Safari and Chrome. So everything is working fine in these browsers until jQuery code is placed in one page. But when using for example tabs plug-in loaded with ajax and on this loaded page exists some extra jQuery code it isn't executed. Co page is loaded but nothing is happening with code which was included. This problem doesn't exists in IE, FF or Opera. It appears only in Safari and Chrome. The same problem is when I'm loading page with $.get, $.post or $.ajax query. So it doesn't affect tabs plug-in but overall functionality. I was checking that with latest versions of jQuery and UI today. Does anyone know solution for this problem? Cheers Radek
[jQuery] [Off-Topic (maybe)] Subversion and Bugtracking
Someone here would happen to know a good bugtracking system that I can start using? It can be free or open source. I also use TortoiseSVN, does it work good with any system in particular? If someone here could point me the directions so I could start, I would be highly appreciated. Thanks, Paul
[jQuery] Re: same effect on multiple objects with same id
On Jun 9, 11:56 am, simon si...@uvfx.tv wrote: this works fine but gives me a lot of jquery code as well for each as i also have a click action after it, but thats another matter, what i am after is if i just give it the same id as below then i would like only to have one hover code that would do the effect to all, but at mo it will only do the effect to the first, any ideas? You can't have more than one element with a given id in HTML (see http://www.w3.org/TR/html401/struct/global.html#adef-id). Give your buttons a class: img src=button.jpg alt=button border=0 id=myButton99 class=fade/ and select them by that instead: $(document).ready(function(){ $(.fade).hover( function () { $(this).fadeTo('fast', .50); }, function () { $(this).fadeTo('fast', 1.0); } ); }); HTH, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/
[jQuery] Re: same effect on multiple objects with same id
I hope this helps: script $(document).ready(function(){ $(#menubar *).mouseover(function () { $(this).fadeTo(slow, 0.33); }); $(#menubar *).mouseout(function () { $(this).fadeTo(slow, 1); }); }); /script
[jQuery] Re: jQuery's code first lin e (function(){・・・・・
its javascript, it got nothing to do with jQuery. for example function funcname1(){ /* do something here */ } now we do something else like setTimeout to trigger the funcname1 setTimeout(funcname1,1000); -- this will delay until 1 second to trigger the function another way to call it setTimeout(function(){ funcname1(); },1000); -- this will do the same. basically function is to do a code that was need to be executed as string yet written as normal code... at least that what i learned so far. and it got nothing to do with jQuery it's part of javascript. jQuery use the same coding rules / grammar so that programmer do not need to familiarize with new function as parameter calling. yup, botrh sample i show explain that it use the function as parameter of another function (in this case setTimeout() function). hope it helps Best Regards Darwin Liem --- On Tue, 6/9/09, wangsuya wang.s...@gmail.com wrote: From: wangsuya wang.s...@gmail.com Subject: [jQuery] jQuery's code first line (function(){・ To: jQuery (English) jquery-en@googlegroups.com Date: Tuesday, June 9, 2009, 3:19 AM Hi everyone Know I try to study javascript using jQuery code,but first I do not know why jQuery start with (function(){ What is ( function? Why using (function(){ start jQuery? Thanks in advance. Wang Suya
[jQuery] Re: same effect on multiple objects with same id
thanks everyone, thats great to here from all the suggestions will give it a go. Much appreciated Si
[jQuery] Re: Functions
function thisismyfunction(){ } $(document).ready(function(){ code in here }); $(document).ready(function(){ thisismyfunction() }); On Jun 9, 6:40 am, simon si...@uvfx.tv wrote: I have some code seperated by script: $(document).ready(function(){ code in here function thisismyfunction(){ } }); then later on i have $(document).ready(function(){ thisismyfunction() }); code in here with a call to the function above, but because its seperated it will not call the above function is there a way I can reference the a function outside in another declaration etc many thanks si
[jQuery] jQuery problem
I'm trying to use the autocomplete plugin for jQuery. I include all the nessesart .js libraries such as bgiframe.js, jquery.autocomplete.js and jqury.js (version 1.3.2). I'm attaching the autocomplete on my textbox and I'm getting the error jQuery is undefined. The autocomplete uses (function ($) { ... })(jQuery). Does anybody know what is the problem? Thanks.
[jQuery] Re: Marquee plugin
try something like jcaroussel plugins google will help you bharani kumar wrote: Hi All , Can u tell me which plugin satisfy me requirement , Like marquee , BACK *IMAGE1 IMAGE2 IMAGE3* NEXT When i click *back* , then i want to move image from *right *to *left *, If i click the *next * i want to move image from *left *to *right *, When i click the *image * , light box must display , Thanks B.S.Bharanikumar -- Regards B.S.Bharanikumar http://php-mysql-jquery.blogspot.com/
[jQuery] Re: Remove links but not images
mm i dont know if this is the best way but you could try $(ul a#click).onclick = function() { return false; } and then on that link you set a style class with the standard cursor Its a workaround but it works On Tue, Jun 9, 2009 at 2:13 PM, alex alex_bille...@hotmail.com wrote: Hi folks This has me stumped. I have a list of images and I want to remove the links but retain the images. So this ul lia href=fooimg src=path/to/image1 //a/li lia href=fooimg src=path/to/image2 //a/li etc etc /ul Becomes this ul liimg src=path/to/image1 //li liimg src=path/to/image2 //li /ul Using this $('ul a').remove(); does not work as it also removes the images as well. Any help would be much appreciated. Thanks in advance. Alex -- Armand Datema CTO SchwingSoft
[jQuery] Re: Functions
so I would put my function outside of the $(document).ready(function() { }? Many thanks Si
[jQuery] Plug-in to display (overlay) DIV element on the page at all times?
Example: http://www.daylife.com/ (facebook tab on the left). Is anyone aware of a jQuery plug-in that would do something similar? Thanks.
[jQuery] Re: Remove links but not images
1-) The dirty way: $('ul li a').removeAttr('href') 2-) A standard way: image = []; $('ul li a img').each(function(i) { image[i] = $(this).clone(); $(this).parents('li').html(image[i]); }) Maurício On Tue, Jun 9, 2009 at 2:13 PM, alex alex_bille...@hotmail.com wrote: Hi folks This has me stumped. I have a list of images and I want to remove the links but retain the images. So this ul lia href=fooimg src=path/to/image1 //a/li lia href=fooimg src=path/to/image2 //a/li etc etc /ul Becomes this ul liimg src=path/to/image1 //li liimg src=path/to/image2 //li /ul Using this $('ul a').remove(); does not work as it also removes the images as well. Any help would be much appreciated. Thanks in advance. Alex -- Armand Datema CTO SchwingSoft
[jQuery] Re: Remove links but not images
Run a .each() to retrieve the images, and delete .remove() the images and place them into a var. Then remove all li gt(0) greater then and replace them into one li It should be doable... On Jun 9, 9:07 am, Armand Datema nok...@gmail.com wrote: mm i dont know if this is the best way but you could try $(ul a#click).onclick = function() { return false; } and then on that link you set a style class with the standard cursor Its a workaround but it works On Tue, Jun 9, 2009 at 2:13 PM, alex alex_bille...@hotmail.com wrote: Hi folks This has me stumped. I have a list of images and I want to remove the links but retain the images. So this ul lia href=fooimg src=path/to/image1 //a/li lia href=fooimg src=path/to/image2 //a/li etc etc /ul Becomes this ul liimg src=path/to/image1 //li liimg src=path/to/image2 //li /ul Using this $('ul a').remove(); does not work as it also removes the images as well. Any help would be much appreciated. Thanks in advance. Alex -- Armand Datema CTO SchwingSoft
[jQuery] Re:[validate] Beginners question. How to pass data from remote file to jQuery.format
anyone that can help me
[jQuery] jQuery Cache and AJAX question
I store a jQuery object ($remove=$(’img.remove’);) in global space at document(ready). Later in the script, I use an AJAX get call which removes one of the images with that class and reloads the div container. The reload has a callback function which needs the number of elements with the 'remove' class ($(’img.remove’).length). In the callback function, should I code $remove.length or $ ('img.remove').length? Is $remove and $('img.remove') equivalent since the DOM changed since I stored the original jQuery object? Thanks in advance. John NYC, USA
[jQuery] Fwd: help for tooltip
please help me !!! -- Forwarded message -- From: Nader dasuki nader...@gmail.com Date: Tue, Jun 9, 2009 at 2:25 PM Subject: help for tooltip To: jquery-en@googlegroups.com hello dears , how can i make same as this tooltip : http://www.alriyadh.com/ see this page at the top , in the above - left side plz help me regards -- Eng. Nader Dasuqi Project Manager +9665339217533 -- Eng. Nader Dasuqi Project Manager +9665339217533
[jQuery] Re: Functions
yes On Jun 9, 9:20 am, simon si...@uvfx.tv wrote: so I would put my function outside of the $(document).ready(function() { }? Many thanks Si
[jQuery] variable manipulation
I have some simple variables $.myvariable1 $.myvariable3 $.myvariable2 now I would like to add the number part of the variable to it dynamically. var i=1 $.myvariable+i and so on, whats the way I could do this, i have tried several like $.myvariable[i] etc but nothing Si
[jQuery] Re: Functions
thanks for that, the only thing i did not try, I am learning now :-) many thanks Si
[jQuery] Re: variable manipulation
Why not use an array ? var myVar = new Array(); var myvarcount = 10; for(int i = 0; i myvarcount; i++) { myVar[i] = I am number : + i; } On Tue, Jun 9, 2009 at 4:35 PM, simon si...@uvfx.tv wrote: I have some simple variables $.myvariable1 $.myvariable3 $.myvariable2 now I would like to add the number part of the variable to it dynamically. var i=1 $.myvariable+i and so on, whats the way I could do this, i have tried several like $.myvariable[i] etc but nothing Si
[jQuery] Re: variable manipulation
sorry i had a syntax error heres the code see just declare an array declare the maximum number you want then loop through them one by one asigning a number to each one :) var myVar = new Array(); // declare array var myvarcount = 10; // maximum vars for(var i = 0; i myvarcount; i++) { // simple for loop myVar[i] = I am number : + i; // assign values to each one in the loop } alert(myVar[6]); // this will alert the sixth value alert(myVar[0]); // also note an array can start from 0 On Tue, Jun 9, 2009 at 4:42 PM, waseem sabjee waseemsab...@gmail.comwrote: Why not use an array ? var myVar = new Array(); var myvarcount = 10; for(int i = 0; i myvarcount; i++) { myVar[i] = I am number : + i; } On Tue, Jun 9, 2009 at 4:35 PM, simon si...@uvfx.tv wrote: I have some simple variables $.myvariable1 $.myvariable3 $.myvariable2 now I would like to add the number part of the variable to it dynamically. var i=1 $.myvariable+i and so on, whats the way I could do this, i have tried several like $.myvariable[i] etc but nothing Si
[jQuery] Re: Remove links but not images
For the example markup you give it's very simple, just do this: $('ul li a').each(function(){ $(this).replaceWith( $(this).children() ); }); On Jun 9, 6:26 am, Adardesign adardes...@gmail.com wrote: Run a .each() to retrieve the images, and delete .remove() the images and place them into a var. Then remove all li gt(0) greater then and replace them into one li It should be doable... On Jun 9, 9:07 am, Armand Datema nok...@gmail.com wrote: mm i dont know if this is the best way but you could try $(ul a#click).onclick = function() { return false; } and then on that link you set a style class with the standard cursor Its a workaround but it works On Tue, Jun 9, 2009 at 2:13 PM, alex alex_bille...@hotmail.com wrote: Hi folks This has me stumped. I have a list of images and I want to remove the links but retain the images. So this ul lia href=fooimg src=path/to/image1 //a/li lia href=fooimg src=path/to/image2 //a/li etc etc /ul Becomes this ul liimg src=path/to/image1 //li liimg src=path/to/image2 //li /ul Using this $('ul a').remove(); does not work as it also removes the images as well. Any help would be much appreciated. Thanks in advance. Alex -- Armand Datema CTO SchwingSoft
[jQuery] Re: variable manipulation
yeah. so its either an array or object. but if you really wanna get messy and have variables like you listed you could echo it out through php script or do an asp response.write however that uses up server side memory to generate JavaScript on run time. so i woul say Array or Object :) On Tue, Jun 9, 2009 at 5:09 PM, Narendra sisodiya naren.sisod...@gmail.comwrote: try to use object like this: var myObject={}; var count=10; for(var i=0;icount;i++) { myObject['value_at_'+i.toString()]=value at +i.toString(); } or assign value like var index=5; myObject['value_at_'+index.toString()]= this is value at 5; alert(myObject['value_at_5']); //display this is value at 5 ~N a R e N On Tue, Jun 9, 2009 at 8:14 PM, waseem sabjee waseemsab...@gmail.comwrote: sorry i had a syntax error heres the code see just declare an array declare the maximum number you want then loop through them one by one asigning a number to each one :) var myVar = new Array(); // declare array var myvarcount = 10; // maximum vars for(var i = 0; i myvarcount; i++) { // simple for loop myVar[i] = I am number : + i; // assign values to each one in the loop } alert(myVar[6]); // this will alert the sixth value alert(myVar[0]); // also note an array can start from 0 On Tue, Jun 9, 2009 at 4:42 PM, waseem sabjee waseemsab...@gmail.comwrote: Why not use an array ? var myVar = new Array(); var myvarcount = 10; for(int i = 0; i myvarcount; i++) { myVar[i] = I am number : + i; } On Tue, Jun 9, 2009 at 4:35 PM, simon si...@uvfx.tv wrote: I have some simple variables $.myvariable1 $.myvariable3 $.myvariable2 now I would like to add the number part of the variable to it dynamically. var i=1 $.myvariable+i and so on, whats the way I could do this, i have tried several like $.myvariable[i] etc but nothing Si
[jQuery] jquery Validate - send email failing
Wondered if anyone could help out. my form is set up to send an email on submission, and is working correctly. But when i add the validation, the redirect to the 'thank you' page works but no email is sent. Thanks for your help
[jQuery] Re: variable manipulation
try to use object like this: var myObject={}; var count=10; for(var i=0;icount;i++) { myObject['value_at_'+i.toString()]=value at +i.toString(); } or assign value like var index=5; myObject['value_at_'+index.toString()]= this is value at 5; alert(myObject['value_at_5']); //display this is value at 5 ~N a R e N On Tue, Jun 9, 2009 at 8:14 PM, waseem sabjee waseemsab...@gmail.comwrote: sorry i had a syntax error heres the code see just declare an array declare the maximum number you want then loop through them one by one asigning a number to each one :) var myVar = new Array(); // declare array var myvarcount = 10; // maximum vars for(var i = 0; i myvarcount; i++) { // simple for loop myVar[i] = I am number : + i; // assign values to each one in the loop } alert(myVar[6]); // this will alert the sixth value alert(myVar[0]); // also note an array can start from 0 On Tue, Jun 9, 2009 at 4:42 PM, waseem sabjee waseemsab...@gmail.comwrote: Why not use an array ? var myVar = new Array(); var myvarcount = 10; for(int i = 0; i myvarcount; i++) { myVar[i] = I am number : + i; } On Tue, Jun 9, 2009 at 4:35 PM, simon si...@uvfx.tv wrote: I have some simple variables $.myvariable1 $.myvariable3 $.myvariable2 now I would like to add the number part of the variable to it dynamically. var i=1 $.myvariable+i and so on, whats the way I could do this, i have tried several like $.myvariable[i] etc but nothing Si
[jQuery] Re: variable manipulation
yeah agree . Its depend on the requirement if some one want to manipulate variable with random number than object is useful otherwise array is good option. ~N a R e N On Tue, Jun 9, 2009 at 8:46 PM, waseem sabjee waseemsab...@gmail.comwrote: yeah. so its either an array or object. but if you really wanna get messy and have variables like you listed you could echo it out through php script or do an asp response.write however that uses up server side memory to generate JavaScript on run time. so i woul say Array or Object :) On Tue, Jun 9, 2009 at 5:09 PM, Narendra sisodiya naren.sisod...@gmail.com wrote: try to use object like this: var myObject={}; var count=10; for(var i=0;icount;i++) { myObject['value_at_'+i.toString()]=value at +i.toString(); } or assign value like var index=5; myObject['value_at_'+index.toString()]= this is value at 5; alert(myObject['value_at_5']); //display this is value at 5 ~N a R e N On Tue, Jun 9, 2009 at 8:14 PM, waseem sabjee waseemsab...@gmail.comwrote: sorry i had a syntax error heres the code see just declare an array declare the maximum number you want then loop through them one by one asigning a number to each one :) var myVar = new Array(); // declare array var myvarcount = 10; // maximum vars for(var i = 0; i myvarcount; i++) { // simple for loop myVar[i] = I am number : + i; // assign values to each one in the loop } alert(myVar[6]); // this will alert the sixth value alert(myVar[0]); // also note an array can start from 0 On Tue, Jun 9, 2009 at 4:42 PM, waseem sabjee waseemsab...@gmail.comwrote: Why not use an array ? var myVar = new Array(); var myvarcount = 10; for(int i = 0; i myvarcount; i++) { myVar[i] = I am number : + i; } On Tue, Jun 9, 2009 at 4:35 PM, simon si...@uvfx.tv wrote: I have some simple variables $.myvariable1 $.myvariable3 $.myvariable2 now I would like to add the number part of the variable to it dynamically. var i=1 $.myvariable+i and so on, whats the way I could do this, i have tried several like $.myvariable[i] etc but nothing Si
[jQuery] Re: jquery Validate - send email failing
what kind of validations are you using and on which event use for validation ? ~ N a R e N On Tue, Jun 9, 2009 at 8:48 PM, philco philipa...@thisworldover.com wrote: Wondered if anyone could help out. my form is set up to send an email on submission, and is working correctly. But when i add the validation, the redirect to the 'thank you' page works but no email is sent. Thanks for your help
[jQuery] selector question
Hi, Im trying to select all spans in divs containing forms that dont have a certain id $(div:not([id='#'+pid]) form span).css(background-color, yellow); This selects all spans regardless of the ID.. Any suggestions would be great! Thanks in advance...
[jQuery] Re: jquery Validate - send email failing
Are you using the submitHandler-option? There is an open issue that prevents the submitting button being send in combination with that option, that may cause your code to fail. Jörn On Tue, Jun 9, 2009 at 5:25 PM, Narendra sisodiyanaren.sisod...@gmail.com wrote: what kind of validations are you using and on which event use for validation ? ~ N a R e N On Tue, Jun 9, 2009 at 8:48 PM, philco philipa...@thisworldover.com wrote: Wondered if anyone could help out. my form is set up to send an email on submission, and is working correctly. But when i add the validation, the redirect to the 'thank you' page works but no email is sent. Thanks for your help
[jQuery] Limit if a value can be selected in a drop down list (select) based on other list
Hi, I have a little problem. I have a page that displays a list of people playing in a tournament. I need to be able to generate a Leaderboard based on which players are manually selected by the admin. Next to each person there is a drop-down list. An admin can go in and select a slot that a player should be in on the leader board from 1 to 8, or leave it blank if none. What I need to figure out how to do is the following, when a change event happens on a drop-down list, and say the value 5 is selected, I need to check to make sure that 5 is not already selected in one of the other players drop-down lists, in other words, that the 5th leaderboard slot is not already full. if it is, display an error message and make them change that one first. Any idea how to do that with jQuery? I'm thinking it will have something to do with the each() function, but not sure exactly how the logic should work.
[jQuery] Re: jQuery's code first lin e (function(){・・・・・
Its called an anonymous closure and prevents jquery from leaking variables into the global scope. The anonymous closure is a function that is defined without a name. //named functions a very common //they are just functions assigned to a variable var myfunction = function(){}; //the anonymous function is not assigned to a variable //it's legal and the following lines show several legal but //relatively useless lines of script that execute just fine but //have no effect, they are all anonymous statements (function(){ var foo; }); (6+1); ('hello '+'world'); //The anonymous function is a little special because //it can be executed immediately by adding (); //with firebug enabled the following line would print\ //'hello world' to the console (function(){ var foo; console.log('hello world'); })(); So why go through all that trouble? The answer is to keep the global scope clean and uncluttered. variable defined in the anonymous closure are available inside that scope but not outside it, so variable collision/confusion between libraries and your code can be avoided and memory leaks more easily avoided as well. //global or outer scope (function(){ //anonymous or inner scope. var foo = 'hello world'; })(); //true if(foo === undefined){ console.log('now I understand anonymous closures!'); } Hope that helps! Thatcher On Tue, Jun 9, 2009 at 8:39 AM, darwin liem darwin.l...@yahoo.com wrote: its javascript, it got nothing to do with jQuery. for example function funcname1(){ /* do something here */ } now we do something else like setTimeout to trigger the funcname1 setTimeout(funcname1,1000); -- this will delay until 1 second to trigger the function another way to call it setTimeout(function(){ funcname1(); },1000); -- this will do the same. basically function is to do a code that was need to be executed as string yet written as normal code... at least that what i learned so far. and it got nothing to do with jQuery it's part of javascript. jQuery use the same coding rules / grammar so that programmer do not need to familiarize with new function as parameter calling. yup, botrh sample i show explain that it use the function as parameter of another function (in this case setTimeout() function). hope it helps Best Regards Darwin Liem --- On *Tue, 6/9/09, wangsuya wang.s...@gmail.com* wrote: From: wangsuya wang.s...@gmail.com Subject: [jQuery] jQuery's code first line (function(){・ To: jQuery (English) jquery-en@googlegroups.com Date: Tuesday, June 9, 2009, 3:19 AM Hi everyone Know I try to study javascript using jQuery code,but first I do not know why jQuery start with (function(){ What is ( function? Why using (function(){ start jQuery? Thanks in advance. Wang Suya -- Christopher Thatcher
[jQuery] Re: variable manipulation
thanks for all the options guys, I did think of arrays but I got a lot of updating to do if so and just to see if that could be done. luckly I only have three variables so not too much of an issue. I also was going to use asp scripting but again if others take on my work here it gets more visually too much. Hey thanks guys Si
[jQuery] Re: Limit if a value can be selected in a drop down list (select) based on other list
$(select).change(function() { var sval = $(this).va(); if(sal == 5) { } else { // do something } }); On Tue, Jun 9, 2009 at 5:35 PM, pixelwiz pixel...@gmail.com wrote: Hi, I have a little problem. I have a page that displays a list of people playing in a tournament. I need to be able to generate a Leaderboard based on which players are manually selected by the admin. Next to each person there is a drop-down list. An admin can go in and select a slot that a player should be in on the leader board from 1 to 8, or leave it blank if none. What I need to figure out how to do is the following, when a change event happens on a drop-down list, and say the value 5 is selected, I need to check to make sure that 5 is not already selected in one of the other players drop-down lists, in other words, that the 5th leaderboard slot is not already full. if it is, display an error message and make them change that one first. Any idea how to do that with jQuery? I'm thinking it will have something to do with the each() function, but not sure exactly how the logic should work.
[jQuery] Re: variable manipulation
what type of updating are you gonna do ? you mean to post these variables ? On Tue, Jun 9, 2009 at 5:43 PM, simon si...@uvfx.tv wrote: thanks for all the options guys, I did think of arrays but I got a lot of updating to do if so and just to see if that could be done. luckly I only have three variables so not too much of an issue. I also was going to use asp scripting but again if others take on my work here it gets more visually too much. Hey thanks guys Si
[jQuery] Re: Limit if a value can be selected in a drop down list (select) based on other list
But how do I add in the fact that I need to check that the currently selected value is not already selected in one of the other 50 drop- down lists on the page? Somehow I need to check if $(this).val() == compare to each selected value in every select on the page. Thanks On Jun 9, 11:45 am, waseem sabjee waseemsab...@gmail.com wrote: $(select).change(function() { var sval = $(this).va(); if(sal == 5) { } else { // do something } }); On Tue, Jun 9, 2009 at 5:35 PM, pixelwiz pixel...@gmail.com wrote: Hi, I have a little problem. I have a page that displays a list of people playing in a tournament. I need to be able to generate a Leaderboard based on which players are manually selected by the admin. Next to each person there is a drop-down list. An admin can go in and select a slot that a player should be in on the leader board from 1 to 8, or leave it blank if none. What I need to figure out how to do is the following, when a change event happens on a drop-down list, and say the value 5 is selected, I need to check to make sure that 5 is not already selected in one of the other players drop-down lists, in other words, that the 5th leaderboard slot is not already full. if it is, display an error message and make them change that one first. Any idea how to do that with jQuery? I'm thinking it will have something to do with the each() function, but not sure exactly how the logic should work.
[jQuery] Re: Marquee plugin
one Good plugin, Thanks , but when i click the left or right side the button , it just showing next section of the images like image 4,5,6 , but am looking when user click left button , need to roll image left side, if clicked right is then move image's right side On Tue, Jun 9, 2009 at 6:37 PM, Erdwin Lianata erdwin.lian...@yahoo.com.sgwrote: try something like jcaroussel plugins google will help you bharani kumar wrote: Hi All , Can u tell me which plugin satisfy me requirement , Like marquee , BACK *IMAGE1 IMAGE2 IMAGE3* NEXT When i click *back* , then i want to move image from *right *to *left *, If i click the *next * i want to move image from *left *to *right *, When i click the *image * , light box must display , Thanks B.S.Bharanikumar -- Regards B.S.Bharanikumar http://php-mysql-jquery.blogspot.com/ -- Regards B.S.Bharanikumar http://php-mysql-jquery.blogspot.com/
[jQuery] Re: Limit if a value can be selected in a drop down list (select) based on other list
Ok, figured it out, just in case someone else needs it (there is probably a better way yet... //check to make sure the slot is not already full var selectedValue; var revert = false; $('.ddl_slots').change(function() { selectedValue = $(this).val(); $('.ddl_slots').each(function() { if ($(this).val() == selectedValue) { revert = true; } }); if (revert) { $(this).val(); alert(This slot is already selected for another player); } }); On Jun 9, 11:51 am, pixelwiz pixel...@gmail.com wrote: But how do I add in the fact that I need to check that the currently selected value is not already selected in one of the other 50 drop- down lists on the page? Somehow I need to check if $(this).val() == compare to each selected value in every select on the page. Thanks On Jun 9, 11:45 am, waseem sabjee waseemsab...@gmail.com wrote: $(select).change(function() { var sval = $(this).va(); if(sal == 5) { } else { // do something } }); On Tue, Jun 9, 2009 at 5:35 PM, pixelwiz pixel...@gmail.com wrote: Hi, I have a little problem. I have a page that displays a list of people playing in a tournament. I need to be able to generate a Leaderboard based on which players are manually selected by the admin. Next to each person there is a drop-down list. An admin can go in and select a slot that a player should be in on the leader board from 1 to 8, or leave it blank if none. What I need to figure out how to do is the following, when a change event happens on a drop-down list, and say the value 5 is selected, I need to check to make sure that 5 is not already selected in one of the other players drop-down lists, in other words, that the 5th leaderboard slot is not already full. if it is, display an error message and make them change that one first. Any idea how to do that with jQuery? I'm thinking it will have something to do with the each() function, but not sure exactly how the logic should work.
[jQuery] Re: variable manipulation
what i havev done is constructe my page and all things working etc etc but long winded, then what I do is then begin to reduce the code down that is on that page whether it be asp, php of js, this way I learn more about the script and in future do that method instead and then my coding gets reduced on the fly etc,any way i set three variables up like $.myVariable1 the 2 then 3 stupid of me, in my mind thought i should do an array from the start but nevermind. Anyway what I mean updating I mean going through each variable and changing it to an array through out my page to $.myVariable(1) etc but thats not a problem just pain :-) Many thanks Si
[jQuery] Re: jQuery's code first lin e (function(){・・・・・
On Jun 9, 7:39 am, darwin liem darwin.l...@yahoo.com wrote: function funcname1(){ /* do something here */ } now we do something else like setTimeout to trigger the funcname1 setTimeout(funcname1,1000); -- this will delay until 1 second to trigger the function No it won't. This will do nothing, since you would need funcname1() to actually run the function. Or preferrably: setTimeout(funcname1,1000); Matt Kruse
[jQuery] Re: selector question
$(div:not(#+pid+) form span).css(background-color,yellow); On Jun 9, 8:19 am, squalli2008 m...@paskell.co.uk wrote: Hi, Im trying to select all spans in divs containing forms that dont have a certain id $(div:not([id='#'+pid]) form span).css(background-color, yellow); This selects all spans regardless of the ID.. Any suggestions would be great! Thanks in advance...
[jQuery] Re: variable manipulation
On Jun 9, 9:35 am, simon si...@uvfx.tv wrote: $.myvariable1 $.myvariable3 $.myvariable2 now I would like to add the number part of the variable to it dynamically. var i=1; $['myvariable'+i] === $.myvariable1 See: http://www.javascripttoolbox.com/bestpractices/#squarebracket Matt Kruse
[jQuery] Pleas help with bug timepickr and validations plugin
Hi, i need use jquery time picker: http://haineault.com/media/jquery/ui-timepickr/page/ and jquery validation plugin: http://bassistance.de/jquery-plugins/jquery-plugin-validation/ When i link this librarys timepicker dont show time good: http://bug.dvdvnovinachacasopisech.eu/test.htm but when i take validation plugin away, timepicker show time good: http://bug.dvdvnovinachacasopisech.eu/test.htm Pleas can you help me, i need use this librarys together. THX
[jQuery] Re: variable manipulation
thanks mark, I knew there was a way as its similar to flash as coding , just I was putting the sqr brackets in wrong place thanks again
[jQuery] Re: Pleas help with bug timepickr and validations plugin
Have been working on this today, see http://code.google.com/p/jquery-utils/issues/detail?id=15 for details. I'll be releaseing 1.5.3 soon... Jörn On Tue, Jun 9, 2009 at 6:53 PM, Pitrsonekpetr.vytla...@gmail.com wrote: Hi, i need use jquery time picker: http://haineault.com/media/jquery/ui-timepickr/page/ and jquery validation plugin: http://bassistance.de/jquery-plugins/jquery-plugin-validation/ When i link this librarys timepicker dont show time good: http://bug.dvdvnovinachacasopisech.eu/test.htm but when i take validation plugin away, timepicker show time good: http://bug.dvdvnovinachacasopisech.eu/test.htm Pleas can you help me, i need use this librarys together. THX
[jQuery] Re: UI accordion and appending new items
On Jun 9, 12:51 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Try to restart the accordion: .accordion(destroy).accordion() Thanks. I came to the exact same solution meanwhile. It works like a charm. -- Branko
[jQuery] Re: jquery Validate - send email failing
I am using the following... $().ready(function() { // validate the comment form when it is submitted $(#commentForm).validate(); }); and the action in the form goes to thankyou.php
[jQuery] Re: jQuery problem
You need to put jquery.js above all other .js's. On Jun 9, 2:58 pm, Masinov masint...@gmail.com wrote: I'm trying to use the autocomplete plugin for jQuery. I include all the nessesart .js libraries such as bgiframe.js, jquery.autocomplete.js and jqury.js (version 1.3.2). I'm attaching the autocomplete on my textbox and I'm getting the error jQuery is undefined. The autocomplete uses (function ($) { ... })(jQuery). Does anybody know what is the problem? Thanks.
[jQuery] Re: Limit if a value can be selected in a drop down list (select) based on other list
Hi All, here is a slight improvement and fix. Turns out you also need to check to make sure that the list id you're comparing to is not itself, and that the value is not blank: //check to make sure the slot is not already full var selectedValue; $('.ddl_slots').change(function() { var ddl_current = $(this); selectedValue = $(this).val(); $('.ddl_slots').each(function() { if ($(this).val() == selectedValue $(this).val() != $ (this).attr('id') != ddl_current.attr('id')) { $(ddl_current).val(); alert(This slot is already selected for another player); } }); }); On Jun 9, 12:08 pm, pixelwiz pixel...@gmail.com wrote: Ok, figured it out, just in case someone else needs it (there is probably a better way yet... //check to make sure the slot is not already full var selectedValue; var revert = false; $('.ddl_slots').change(function() { selectedValue = $(this).val(); $('.ddl_slots').each(function() { if ($(this).val() == selectedValue) { revert = true; } }); if (revert) { $(this).val(); alert(This slot is already selected for another player); } }); On Jun 9, 11:51 am, pixelwiz pixel...@gmail.com wrote: But how do I add in the fact that I need to check that the currently selected value is not already selected in one of the other 50 drop- down lists on the page? Somehow I need to check if $(this).val() == compare to each selected value in every select on the page. Thanks On Jun 9, 11:45 am, waseem sabjee waseemsab...@gmail.com wrote: $(select).change(function() { var sval = $(this).va(); if(sal == 5) { } else { // do something } }); On Tue, Jun 9, 2009 at 5:35 PM, pixelwiz pixel...@gmail.com wrote: Hi, I have a little problem. I have a page that displays a list of people playing in a tournament. I need to be able to generate a Leaderboard based on which players are manually selected by the admin. Next to each person there is a drop-down list. An admin can go in and select a slot that a player should be in on the leader board from 1 to 8, or leave it blank if none. What I need to figure out how to do is the following, when a change event happens on a drop-down list, and say the value 5 is selected, I need to check to make sure that 5 is not already selected in one of the other players drop-down lists, in other words, that the 5th leaderboard slot is not already full. if it is, display an error message and make them change that one first. Any idea how to do that with jQuery? I'm thinking it will have something to do with the each() function, but not sure exactly how the logic should work.
[jQuery] Drag Drop to sort categories and post this new sort order to dB?
OK so Ive been using jquery for a little bit now and love it. I am a ColdFusion developer. I have a need where I would like to present the user with a list of categories and the user can drag and drop to sort, but then I need to post this new sort order to the database. So I see there are a ton of cool drag drop plugins for jquery. I understand how they work and I can get it to work as far as spitting out DIVS or spitting out ULs that can be sorted, but then what? So now they are sorted on my screen and not really part of the form. How do I translate that into something I can do a post to the database with? Do I do an AJAX call every time they drop an item and try to extrapolate the sort order on that item after they drop it? Do I populate a hidden form field with the constantly updating sort order list? MAybe a list of ID's? How does everyone else go about this this task? I'm sure there is more than one way and I'm sure this is a common task. THANKS!
[jQuery] Handling key event in Chrome or Safari during a popup
I am currently following the image popup example from: http://yensdesign.com/2008/09/how-to-create-a-stunning-and-smooth-popup-using-jquery/ The demo is at: http://yensdesign.com/tutorials/popupjquery/ If I run the demo on Windows XP on Chrome or Safari, the escape key doesn't close the popup window. How do I handle this in jQuery for those two browsers?
[jQuery] Re: Remove links but not images
Thanks for all the help folks - problem sorted out now - I appreciate it. Take care Alex On 9 June, 16:11, mkmanning michaell...@gmail.com wrote: For the example markup you give it's very simple, just do this: $('ul li a').each(function(){ $(this).replaceWith( $(this).children() ); }); On Jun 9, 6:26 am, Adardesign adardes...@gmail.com wrote: Run a .each() to retrieve the images, and delete .remove() the images and place them into a var. Then remove all li gt(0) greater then and replace them into one li It should be doable... On Jun 9, 9:07 am, Armand Datema nok...@gmail.com wrote: mm i dont know if this is the best way but you could try $(ul a#click).onclick = function() { return false; } and then on that link you set a style class with the standard cursor Its a workaround but it works On Tue, Jun 9, 2009 at 2:13 PM, alex alex_bille...@hotmail.com wrote: Hi folks This has me stumped. I have a list of images and I want to remove the links but retain the images. So this ul lia href=fooimg src=path/to/image1 //a/li lia href=fooimg src=path/to/image2 //a/li etc etc /ul Becomes this ul liimg src=path/to/image1 //li liimg src=path/to/image2 //li /ul Using this $('ul a').remove(); does not work as it also removes the images as well. Any help would be much appreciated. Thanks in advance. Alex -- Armand Datema CTO SchwingSoft
[jQuery] Re: Remove links but not images
Thanks for all the help folks - problem sorted out now - I appreciate it. Take care Alex On 9 June, 16:11, mkmanning michaell...@gmail.com wrote: For the example markup you give it's very simple, just do this: $('ul li a').each(function(){ $(this).replaceWith( $(this).children() ); }); On Jun 9, 6:26 am, Adardesign adardes...@gmail.com wrote: Run a .each() to retrieve the images, and delete .remove() the images and place them into a var. Then remove all li gt(0) greater then and replace them into one li It should be doable... On Jun 9, 9:07 am, Armand Datema nok...@gmail.com wrote: mm i dont know if this is the best way but you could try $(ul a#click).onclick = function() { return false; } and then on that link you set a style class with the standard cursor Its a workaround but it works On Tue, Jun 9, 2009 at 2:13 PM, alex alex_bille...@hotmail.com wrote: Hi folks This has me stumped. I have a list of images and I want to remove the links but retain the images. So this ul lia href=fooimg src=path/to/image1 //a/li lia href=fooimg src=path/to/image2 //a/li etc etc /ul Becomes this ul liimg src=path/to/image1 //li liimg src=path/to/image2 //li /ul Using this $('ul a').remove(); does not work as it also removes the images as well. Any help would be much appreciated. Thanks in advance. Alex -- Armand Datema CTO SchwingSoft
[jQuery] Re: Page turning effect
I Like it! It's actually close to something I've been trying to accomplish for a while. Now if only you had zoom in, in-line commenting for the page, and a smoother transition for the flip this would be GOLD! But all in all great work Oscar! On Jun 8, 12:56 pm, Oscar Alderete oscaralder...@gmail.com wrote: Hi, I just did a project with 'turn page' effect made with jQuery and PHP. jQuery manage all effects and PHP manage content. This project was developed for an intranet but I'm doing something like a blog with that project scripts for public access. If you want take a first look just check it:http://oscaralderete.com/eBlogk
[jQuery] Re: jQuery Form Plugin with a submit button outside of the form
You are able to span a form across a few divs. What I realized though is that there must be an equel number of divs between the Form tags to work properly for example this will work form div random content /div div my form elements to submit /div div content /div div content/div submit button /form This will not work for me, and this is what I was trying to do from the get go. form div random content /div div my form elements to submit /div div content /div div content submit button /form /div Necmettin, thanx for the help!
[jQuery] tabs with cycle crashes in ie6
Hi Everybody, i'm doing a site that uses tabs and cycle together, cycle inside the tabs.. In Firefox (every version), opera, safari works... But when i go with IE6 into the page Ambientes, the IE6 Crashes... and is not everytime... i am sending a link with a screenshot... Here is the SS: http://img192.imageshack.us/img192/9825/ie6u.jpg -- This is the site: http://www.bolichepinguim.com.br/index.php -- This is the direct link: http://www.bolichepinguim.com.br/index.php?cmd=ambientes When i 'turn off' the cycle, everything works... when i 'turn off' the tabs, everything works too.. Do somebody knows what may be happening? Thank you Mauricio Vargas
[jQuery] Best Practices
The following form is used in several plug-ins... var oGlobalObject; (function( externalObject) { ... code here, setup properties and methods on externalObject })( oGlobalObject ); so variable abc is defined as a global object with properties and methods.. Is the following form equivalent? var abc = function() { var oObject = {}; ... code here, setup properties and methods on oObject. return oObject; }(); It seems to me that one of these forms is more straightforward. Is there good reason to use one form over the other?
[jQuery] Re: selector question
You probably don't want the '#' character in there: $(div:not(+pid+) form span).css(background-color,yellow); On Jun 9, 11:45 am, mkmanning michaell...@gmail.com wrote: $(div:not(#+pid+) form span).css(background-color,yellow); On Jun 9, 8:19 am, squalli2008 m...@paskell.co.uk wrote: Hi, Im trying to select all spans in divs containing forms that dont have a certain id $(div:not([id='#'+pid]) form span).css(background-color, yellow); This selects all spans regardless of the ID.. Any suggestions would be great! Thanks in advance...
[jQuery] Re: jQuery Form Plugin with a submit button outside of the form
You are able to span a form across a few divs. What I realized though is that there must be an equel number of divs between the Form tags to work properly Yeah, valid markup always helps. :-) http://validator.w3.org/
[jQuery] iframe and xml
I have been trying to insert xml into an iframe. I can do it kinda. The problem is the iframe has html/html tags and if the xml has items that look like head tags like title etc they end up in the head. For example I have a atom file that looks like this: ?xml version=1.0 encoding=UTF-8? feed version=0.3 xmlns=http://purl.org/atom/ns#; titleGmail - Inbox for bartonphill...@gmail.com/title taglineNew messages in your Gmail Inbox/tagline fullcount4/fullcount link rel=alternate href=http://mail.google.com/mail; type=text/ html / modified2009-06-07T22:20:48Z/modified entry titleTORNADO WARNING from 9News CustomCast/title summarySevere Weather Bulletin Click here to get additional current severe weather information This is .../summary link rel=alternate href=http://mail.google.com/mail? account_id=bartonphillips %40gmail.comamp;message_id=121bc3ef3abda1f1amp;view=convamp;extsrc=atom type=text/html / modified2009-06-07T19:43:10Z/modified issued2009-06-07T19:43:10Z/issued idtag:gmail.google.com,2004:1304851949303996913/id author name9News-CustomCast/name email9news-customc...@subs.myweather.net/email /author /entry . When I do this: var iframe = $(#frame)[0]; var doc = iframe.contentDocument; if(!doc) doc = iframe.contentWindow.document; $(html, doc).load(atom.xml); The html head tag gets the titles rather than the feed version=0.3 xmlns=http://purl.org/atom/ns#; in the body? Is there a way to make the iframe look like an xml document instead of an html doc?
[jQuery] Superfish - solid background
Hello, which is the setting (and where can I find it) to make the background of a dropdown menu solid? I like the settings from A very basic superfish menu example but I can't see where to override the color. I'm attaching an image (hopefully will go through) of how the superfish menu shows up on my page. To remove the shadow is easy, but I would like the background to be solid. thank you very much and cheers! rafa. [image: menusamp.jpg] . inline: menusamp.jpg
[jQuery] Re: NEW jQuery Cheat Sheet for 1.3.2
Thanks Matt! Very nicely done. On May 7, 12:01 pm, Matt Kruse m...@thekrusefamily.com wrote: I've updated my previous cheat sheet to be in line with jQuery 1.3.2. I think it's more useful than other cheat sheets that simply dump method names, but hey, that's personal preference ;) http://www.javascripttoolbox.com/jquery/cheatsheet/ Enjoy Matt Kruse
[jQuery] Re: selector question
Yes you do, if you want to filter by ID. Unless the variable pid = #some_id. On Jun 9, 1:29 pm, Danny d.wac...@prodigy.net wrote: You probably don't want the '#' character in there: $(div:not(+pid+) form span).css(background-color,yellow); On Jun 9, 11:45 am, mkmanning michaell...@gmail.com wrote: $(div:not(#+pid+) form span).css(background-color,yellow); On Jun 9, 8:19 am, squalli2008 m...@paskell.co.uk wrote: Hi, Im trying to select all spans in divs containing forms that dont have a certain id $(div:not([id='#'+pid]) form span).css(background-color, yellow); This selects all spans regardless of the ID.. Any suggestions would be great! Thanks in advance...
[jQuery] Re: jquery Validate - send email failing
In this case there is no apparent reason that the plugin could somehow affect your serverside script. A testpage is necessary to debug it. Jörn On Tue, Jun 9, 2009 at 7:36 PM, philcophilipa...@thisworldover.com wrote: I am using the following... $().ready(function() { // validate the comment form when it is submitted $(#commentForm).validate(); }); and the action in the form goes to thankyou.php
[jQuery] Re: Form plugin asynchronous behavior
test
[jQuery] Ajax.load doesn't work for head element?
Greetings, I'm trying to replace the head of a page with the head of another page. For example, in http://docs.jquery.com/Main_Page, I call $(head).load(/About head) expecting to replace the head section of the current page with that of http://docs.jquery.com/About. However, the function seems to insert an empty string into my head tag. Any idea why that might be? Hannes
[jQuery] Re: Plug-in to display (overlay) DIV element on the page at all times?
Did you mean the feedback tab? The name of the magic is position:fixed and a high z-index, that's all. btw that looks like a rip off from uservoice.com, who seems to have started this feedback tab thing On Jun 9, 10:20 am, Mark Livingstone namematters...@msn.com wrote: Example:http://www.daylife.com/(facebook tab on the left). Is anyone aware of a jQuery plug-in that would do something similar? Thanks.
[jQuery] Re: Plug-in to display (overlay) DIV element on the page at all times?
the was something in the JQuery UI called Overlay. where it placed a rounder transparent div over some content. On Tue, Jun 9, 2009 at 11:01 PM, Ricardo ricardob...@gmail.com wrote: Did you mean the feedback tab? The name of the magic is position:fixed and a high z-index, that's all. btw that looks like a rip off from uservoice.com, who seems to have started this feedback tab thing On Jun 9, 10:20 am, Mark Livingstone namematters...@msn.com wrote: Example:http://www.daylife.com/(facebookhttp://www.daylife.com/%28facebooktab on the left). Is anyone aware of a jQuery plug-in that would do something similar? Thanks.
[jQuery] Re: Plug-in to display (overlay) DIV element on the page at all times?
z-index 7001 should be fine ? On Tue, Jun 9, 2009 at 11:25 PM, waseem sabjee waseemsab...@gmail.comwrote: the was something in the JQuery UI called Overlay. where it placed a rounder transparent div over some content. On Tue, Jun 9, 2009 at 11:01 PM, Ricardo ricardob...@gmail.com wrote: Did you mean the feedback tab? The name of the magic is position:fixed and a high z-index, that's all. btw that looks like a rip off from uservoice.com, who seems to have started this feedback tab thing On Jun 9, 10:20 am, Mark Livingstone namematters...@msn.com wrote: Example:http://www.daylife.com/(facebookhttp://www.daylife.com/%28facebooktab on the left). Is anyone aware of a jQuery plug-in that would do something similar? Thanks.
[jQuery] Re: tabs with cycle crashes in ie6
Degrading is an options if browser is IE6 tabs will not be dynamic. you can use php or ASP to load content on postback however the above method is a last ditch solution On Tue, Jun 9, 2009 at 10:22 PM, Mauricio Vargas pixelcriat...@gmail.comwrote: Hi Everybody, i'm doing a site that uses tabs and cycle together, cycle inside the tabs.. In Firefox (every version), opera, safari works... But when i go with IE6 into the page Ambientes, the IE6 Crashes... and is not everytime... i am sending a link with a screenshot... Here is the SS: http://img192.imageshack.us/img192/9825/ie6u.jpg -- This is the site: http://www.bolichepinguim.com.br/index.php -- This is the direct link: http://www.bolichepinguim.com.br/index.php?cmd=ambientes When i 'turn off' the cycle, everything works... when i 'turn off' the tabs, everything works too.. Do somebody knows what may be happening? Thank you Mauricio Vargas
[jQuery] Re: Handling key event in Chrome or Safari during a popup
check this link $(#mytextbox).keyup(function(event){ if (event.keyCode == 27) { $(this).attr({ value:Escape }); } }); On Tue, Jun 9, 2009 at 8:59 PM, Thierry lamthie...@gmail.com wrote: I am currently following the image popup example from: http://yensdesign.com/2008/09/how-to-create-a-stunning-and-smooth-popup-using-jquery/ The demo is at: http://yensdesign.com/tutorials/popupjquery/ If I run the demo on Windows XP on Chrome or Safari, the escape key doesn't close the popup window. How do I handle this in jQuery for those two browsers?
[jQuery] Re: Ajax.load doesn't work for head element?
using document.ready(function() or $(function() means that JQuery only executes after the DOM is ready or fully loaded respectively. if you want to change the title of a page the simple document.title should work else you can have the head of a page load through either php or asp or jsp or any other server side script. On Tue, Jun 9, 2009 at 6:57 PM, hannes hhe...@gmail.com wrote: Greetings, I'm trying to replace the head of a page with the head of another page. For example, in http://docs.jquery.com/Main_Page, I call $(head).load(/About head) expecting to replace the head section of the current page with that of http://docs.jquery.com/About. However, the function seems to insert an empty string into my head tag. Any idea why that might be? Hannes
[jQuery] Re: Ajax.load doesn't work for head element?
What a CMS usually does. ( like joomla ) the contents of the head of a page is stored in a include file. you just call this include file each time. or based on certian variables you can call different include files. if you include parameters in your class for the include file you can edit your head tag at a server level at run time. for the jquery bit of doing it. don't try to replace the whole head tag try to replace whats within it. using prepend() append() remove() On Tue, Jun 9, 2009 at 11:15 PM, waseem sabjee waseemsab...@gmail.comwrote: using document.ready(function() or $(function() means that JQuery only executes after the DOM is ready or fully loaded respectively. if you want to change the title of a page the simple document.title should work else you can have the head of a page load through either php or asp or jsp or any other server side script. On Tue, Jun 9, 2009 at 6:57 PM, hannes hhe...@gmail.com wrote: Greetings, I'm trying to replace the head of a page with the head of another page. For example, in http://docs.jquery.com/Main_Page, I call $(head).load(/About head) expecting to replace the head section of the current page with that of http://docs.jquery.com/About. However, the function seems to insert an empty string into my head tag. Any idea why that might be? Hannes