[jQuery] Re: Stop browser to be closed
I need some way to trigger a AJAX that will do the Logoff (and with that end the user session) if user just hit the X to close the browser. I will look about onbeforeunload, thanks! Feijó MorningZ escreveu: I'm not 100% sure what you are after ultimately... but i think the _javascript_ event "onbeforeunload" is what you need to use http://www.google.com/search?q=_javascript_+onbeforeunload
[jQuery] Stop browser to be closed
Can I detect and stop user to close the window without logout ? I have a win-cgi system that is configured to a few hours session timeout, so if the user abandon the session, it will die only in several hours I saw that kind of warning or auto-logoff somewhere, just cant remember. How could I implement that with jQuery? Thanks a lot! Alessandro Feijó
[jQuery] Re: accessing the content of iframe
I'm trying to access content of a external frame, a page loaded from another server it seams impossible, when I try with local page, it works Is that so? Some kind of protection? thanks Feijó smoothcriminal escreveu: You can use it using the function contents() . For example if you want to hide an element inside an iframe: $('#iframeID').contents().find('#innerElementID').hide(); Piyush --- http://piyush.goel.googlepage.com/ On Apr 29, 8:38 am, Teonator <[EMAIL PROTECTED]> wrote: Hi, Let say I have page A with an iframe (# ifrmContent) where its src is page B. The page B have a checkbox (# chkAgree). How am I going to access the checkbox in page B using the selector from page A (parent)? Could someone guide me a bit? Cheers, Teon
[jQuery] Re: what editor do you use?
Thanks for the tip!! I set my copy line as CTRL+D and assigned that Swap with line above/below :) Feijó Sean O escreveu: I used Notepad++ for a while, thinking it was the bee's knees. But then I found PSPad a few months ago, and it's earned my title as go-to editor. Tabbed Interface, multi-code-highlighting, live FTP editing, projects, text diffs, many user-created extensions, etc. etc. What sealed it for me was the built-in site management over FTP. Work with remote files as if they're local. Couple that with ability to run from your USB drive (with no install), and you've got a powerful, anywhere, any-code editor. And as for the handy "duplicate line" function from Notepad++: Tools >> Program Settings >> Key Map >> Edit >> Copy Line Assign your own shortcut key. I chose Ctrl-Alt-D. "Swap with Line Above/Below" is also quite convenient. http://www.pspad.com SEAN O ___ www.sean-o.com
[jQuery] Re: what editor do you use?
Yeah, I'm enjoying that pspad but I cant find a good feature I'm used to use with notepad++ CTRL+D duplicate current line/selection. Do you know if it exists in pspad? Or I can script it? baita abraço Feijó Stamen Georgiev escreveu: PSPad - http://www.pspad.com/ It's free and it comes really close to HomeSite, which I used for years. I love the scripting features. On Feb 13, 6:38 pm, Feijó <[EMAIL PROTECTED]> wrote: I changed my own a few weeks ago, now I'm using Editpad++ (http://sourceforge.net/projects/notepad-plus/) its freeware, nice resources, like macros, quick-text, highlighted source, ... and yours?-- Feijó
[jQuery] Re: what editor do you use?
nice one!! I'll give it a try for few days timothytoe escreveu: I tried a bunch and ended up with PSPad.
[jQuery] Re: what editor do you use?
They improved a little the interface, has been some time since the last time I saw it But editpad++ is free!! editplus has pay resources :) baita abraço Feijó Andy Matthews escreveu: Not sure what you mean...I just looked at a screenshot of Notepad++ and it looks almost the same as Editplus. Notepad++ http://sourceforge.net/project/screenshots.php?group_id=95717 Editplus http://www.editplus.com/ss/editplus.gif From: jquery-en@googlegroups.com [mailto:jquery-en@googlegroups.com] On Behalf Of Feijó Sent: Wednesday, February 13, 2008 10:53 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: what editor do you use? I dont like the editplus interface, very ancient :) But its a good app too!! Feijó Andy Matthews escreveu: Editplus www.editplus.com Best one I've found in 6+ years of looking, been using it for about the same amount of time. From: jquery-en@googlegroups.com [mailto:jquery-en@googlegroups.com] On Behalf Of Feijó Sent: Wednesday, February 13, 2008 10:38 AM To: jquery-en@googlegroups.com Subject: [jQuery] what editor do you use? I changed my own a few weeks ago, now I'm using Editpad++ (http://sourceforge.net/projects/notepad-plus/) its freeware, nice resources, like macros, quick-text, highlighted source, ... and yours? -- Feijó
[jQuery] Re: what editor do you use?
I dont like the editplus interface, very ancient :) But its a good app too!! Feijó Andy Matthews escreveu: Editplus www.editplus.com Best one I've found in 6+ years of looking, been using it for about the same amount of time. From: jquery-en@googlegroups.com [mailto:jquery-en@googlegroups.com] On Behalf Of Feijó Sent: Wednesday, February 13, 2008 10:38 AM To: jquery-en@googlegroups.com Subject: [jQuery] what editor do you use? I changed my own a few weeks ago, now I'm using Editpad++ (http://sourceforge.net/projects/notepad-plus/) its freeware, nice resources, like macros, quick-text, highlighted source, ... and yours? -- Feijó
[jQuery] Re: what editor do you use?
lol yes, notepad++ Feijó spinnach escreveu: ..you mean notepad++ :).. i'm using it also, great little app.. dennis. Feijó wrote: I changed my own a few weeks ago, now I'm using Editpad++ (http://sourceforge.net/projects/notepad-plus/) its freeware, nice resources, like macros, quick-text, highlighted source, ... and yours? -- Feijó
[jQuery] what editor do you use?
I changed my own a few weeks ago, now I'm using Editpad++ (http://sourceforge.net/projects/notepad-plus/) its freeware, nice resources, like macros, quick-text, highlighted source, ... and yours? -- Feijó
[jQuery] Re: div index
I'm working with divs When a image is clicked, I clone the first criteria, clear it, and append to the main div. It goes to the bottom, its ok so far, no problem. But, in some criteria, if in a combobox is selected a specific item, it will trigger the above clone code, know it need to insert bellow that criteria, not in the bottom!! I had tested index() after I send my msg to the group, in some moments it bring a valid number aparently valid to my eq(), then I can use with after() Tomorrow I will continue that study, maybe I'm in the right path :) motob escreveu: Can you post a little more info? Maybe some of your html code that goes along with what jquery is working with? Are you trying to add a new criteria text box to a search form when #new-criteria is clicked? Are you working with table cells or divs? On Feb 12, 3:14 pm, Feijó <[EMAIL PROTECTED]> wrote: How can I get the index of one of my class? I'm reading all in docs.jquery.com and found nothing $("#new-criteria").click(function(){ $last = $('#thefilter .qz-tablefield:eq(1)') .clone(true); index= 1;// here, how to get the index of "this"? $('#qz-criteria .qz-tablefield:eq('+index+')').after($last); }); ThanksFeijó
[jQuery] div index
How can I get the index of one of my class? I'm reading all in docs.jquery.com and found nothing $("#new-criteria").click(function(){ $last = $('#thefilter .qz-tablefield:eq(1)') .clone(true); index = 1; // here, how to get the index of "this"? $('#qz-criteria .qz-tablefield:eq('+index+')').after($last); }); Thanks Feijó
[jQuery] [off topic] invite to game :)
When you're not working, try this nice game to relax http://delta.astroempires.com/?ref=D.60589 I'm loving, started play about 10 days :) -- Feijó
[jQuery] Re: Appending content in order
Indeed, a good example would be the best way to explain. <fieldset id="thefilter" class=" collapsible"><legend>Criterialegend> <div id=qz-criteria> <div class=qz-tablefield><div class="form-item"> <div id=h_table>Tablediv> <div id=h_field>Fielddiv> <div id=h_value>Valuediv> div> div> <div class="qz-tablefield"> <div class="form-item"> <select name="table[]" class="form-select edit-table" id="edit-table[]" ><option value="0">Select a tableoption><option value="1">incidentsoption><option value="3">qualifyoption><option value="2">technicaloption><option value="9">criticalitiesoption><option value="5">groupsoption><option value="7">originsoption><option value="6">positionsoption><option value="8">prioritiesoption><option value="4">reasonsoption><option value="10">statusoption>select> div> <div class="form-item"> <select name="field[]" class="form-select edit-field" id="edit-field[]" ><option value="0">Select a tableoption>select> div> <div class="form-item"> <select name="value[]" class="form-select edit-value" id="edit-value[]" ><option value="0">Select a fieldoption>select> div> <div class=form-item><img src="/drupal/themes/test/pic/ico_proximo.png" id="new-criteria" border="0" align="absmiddle">New criteria div> div> fieldset> the brighter blue, is the cloned in question. How to control the order it will be inserted/appended? the relevant jQuery is: $("#thefilter img#new-criteria").click(function(){ $last = $('#thefilter .qz-tablefield:eq(1)') // clone the first qz-tablefield that contain what we want, the eq(0) is the header .clone(true); $last .appendTo($('#thefilter')) // append to parent, #thefilter, but need to insert after the one we click, not the bottom .hide() .fadeIn('medium') // just some flowers .find('.clean-criteria') .trigger('click'); // clear all inputs to be filled by user }); I think thats enough. I dont want to avalanche with irrelevant code. TIA!! Feijó Karl Swedberg escreveu: Hi again. :) This should help you understand what :eq() does: http://docs.jquery.com/Selectors/eq#index "Matches a single element by its [zero-based] index." I'm sure we can achieve what you're trying to do, but it's hard for me to help without being able to at least see the HTML. As it is, I don't know what .qz-tablefield is, for example. Can you point me to a web page or even just provide an HTML snippet? Thanks, --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Feb 11, 2008, at 3:07 PM, Feijó wrote: Hi Karl, Its a bit more confunsing, I simplified too much In my div, I change a value from a that triggers a code that clone the parent (the div) If I do that a few times, every new div goes to the bottom I do not know what eq() is!! there is a function that return that? Here is a sample of current code: $("#thefilter img#new-criteria").click(function(){ $last = $('#thefilter .qz-tablefield:eq(1)') .clone(true); $last .appendTo($('#qz-criteria')) .hide() .fadeIn('medium') .find('.clean-criteria') .trigger('click'); }); my triggers that event. How to adjust with your suggestion? Feijó Karl Swedberg escreveu: Hi Feijó, you could try this ... $('div.main > div.sub:eq(2)').after(''); That should insert your new div after the 3rd one. --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Feb 11, 2008, at 2:25 PM, Feijó wrote: consider that html: I need to append a new as the 2nd, 3rd, middle, etc. Append() add after the last one. How can I do that? Its possible? Thanks Feijó
[jQuery] Re: Appending content in order
Hi Karl, Its a bit more confunsing, I simplified too much In my div, I change a value from a that triggers a code that clone the parent (the div) If I do that a few times, every new div goes to the bottom I do not know what eq() is!! there is a function that return that? Here is a sample of current code: $("#thefilter img#new-criteria").click(function(){ $last = $('#thefilter .qz-tablefield:eq(1)') .clone(true); $last .appendTo($('#qz-criteria')) .hide() .fadeIn('medium') .find('.clean-criteria') .trigger('click'); }); my triggers that event. How to adjust with your suggestion? Feijó Karl Swedberg escreveu: Hi Feijó, you could try this ... $('div.main > div.sub:eq(2)').after(''); That should insert your new div after the 3rd one. --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Feb 11, 2008, at 2:25 PM, Feijó wrote: consider that html: I need to append a new as the 2nd, 3rd, middle, etc. Append() add after the last one. How can I do that? Its possible? Thanks Feijó
[jQuery] Appending content in order
consider that html: I need to append a new as the 2nd, 3rd, middle, etc. Append() add after the last one. How can I do that? Its possible? Thanks Feijó
[jQuery] Re: Fighting a closure
I'm yet to be an expert in jQuery :) But I would solve that like this: $(".port").click(function() {bigchart($(this).attr('port-id') )}); now in your html code, I guess its like: change to Feijó timothytoe escreveu: I think I submitted a half-done version of this message by accident a few minutes ago. Sorry. This works: $("#port0").click(function() {bigchart(0)}); $("#port1").click(function() {bigchart(1)}); $("#port2").click(function() {bigchart(2)}); $("#port3").click(function() {bigchart(3)}); $("#port4").click(function() {bigchart(4)}); I try to roll it up like this: for (i=0;i<5;i++) { $("#port"+i).click(function() {bigchart(i)}); } But the closure gets me. When the function is called, i is 5 for any of the buttons. What is the elegant solution here?
[jQuery] Re: Is this the best way?
Yeah, its all div and within a particular parent!! I'm alreading having that kind of care, adding specificity for all my selectors. It should improve performance, I bet :) Thanks Joel Joel Birch escreveu: On 31/01/2008, Feijó <[EMAIL PROTECTED]> wrote: Its possible to simple use like this? $('.qualif[level>3]').remove(); I don't think there is a way to do that unfortunately. Pete had a good point about optimising your selector for speed though. For example, if you know all the .qualif elements are divs and are all within a particular parent that has an id, say 'content', then you should write the selector with greater specificity like so: $('#content div.qualif').filter( ... Joel Birch.
[jQuery] Re: Is this the best way?
Hi Cabbite Thanks for your 0.02 Its possible to simple use like this? $('.qualif[level>3]').remove(); if level bigger then 3, remove it :) My code is dynamic, I cant just wrote all numbers I dont need to remove, like your example. Has to use a condition. Feijó cabbiepete escreveu: Hi Felix, I would have thought doing an attribute selector like you suggest was better. something like ... $('.qualif[level]).each ... to at least get rid of anything that doesn't have the level attribute. Also if you use the same tag name for all of these attributes its worth adding that as it also helps with efficiency, i.e. jquery only has to check those tags for level attribute. Depending on the exact use of the level attribute you might be able to get just the ones you want by using [attribute!=value] selectors. i.e. if you want greater than 4 and start at 0 $('.qualif[level!=0], .qualif[level!=1], .qualif[level! =2], .qualif[level!=3], qualif[level!=4]').remove(); Hope that helps. Also if any more expert on jquery knows more am keen to know better also. Cheers, Pete On Jan 30, 12:56 pm, Feijó <[EMAIL PROTECTED]> wrote: > Hi, I was just wondering if there is any better way to accomplish > that. Some divs has 'level' attribute, with a number. If that > number is bigger than X, will remove the div. var x=4; // > simulating level=parseFloat($this.attr('level')); > $('.qualif').each(function() { if ($(this).attr('level')>x) > $(this).remove(); }); I don't know if we can set a filter in $('') > to look at a custom attribute, should be simpler than Feijó
[jQuery] Re: Is this the best way?
Thats it! Nice code Thanks Joel Feijó Joel Birch escreveu: Hi Feijó, Not sure if I understand, but I'll have a go at it: var x = 4; $('.qualif').filter(function() { return parseFloat( $(this).attr('level') ) > x; }).remove(); Joel Birch.
[jQuery] Is this the best way?
Hi, I was just wondering if there is any better way to accomplish that. Some divs has 'level' attribute, with a number. If that number is bigger than X, will remove the div. var x=4; // simulating level=parseFloat($this.attr('level')); $('.qualif').each(function() { if ($(this).attr('level')>x) $(this).remove(); }); I don't know if we can set a filter in $('') to look at a custom attribute, should be simpler than Feijó
[jQuery] Re: Autocomplete with ComboBox
Damm, I was refering to Drupal Autocomplete solution. Totally forgot to mention. A single autocomplete is automatic within drupal form API. I need to extend that ability making the autocomplete sensitive to a combobox, using jquery off course. Anyone from this list did that? Feijó Diego A. escreveu: There's no need for a new plugin. This is all down to your implementation. 1. Create the state autocomplete field. 2. Use the callback function to create the city autocomplete field (pointing to the list of cities of the selected state). Done :-) On Jan 24, 4:33 pm, Feijó <[EMAIL PROTECTED]> wrote: I've been seen people trying to do that A combo with State, after selected one, the Edit field sould autocomplete with cities from within that state, not all of them. How can this be done? There is any page about that on jquery docs? If not why don't we do that? I voluntere, with group help off course :)-- regards Feijó
[jQuery] Autocomplete with ComboBox
I've been seen people trying to do that A combo with State, after selected one, the Edit field sould autocomplete with cities from within that state, not all of them. How can this be done? There is any page about that on jquery docs? If not why don't we do that? I voluntere, with group help off course :) -- regards Feijó
[jQuery] Re: How to validate form controls
try if ($('.mydiv').val()) { // has values } else { // don't has values } Feijó -- From: <[EMAIL PROTECTED]> Sent: Friday, January 18, 2008 3:24 AM To: "jQuery (English)" Subject: [jQuery] How to validate form controls Hi, i have 3 textboxes under . i would like to validate the Textbox ie textbox is empty. i have done validation for each individual textbox by using their id,but i need coding for validate the TextBox using div id ie mydiv. Waiting for your favourable reply, karthik d.s
[jQuery] Re: simple newbie js function problem...
try with force function outside $...ready Feijó - Original Message - From: "tlob" <[EMAIL PROTECTED]> To: "jQuery (English)" Sent: Tuesday, January 15, 2008 4:11 PM Subject: [jQuery] simple newbie js function problem... script type="text/javascript"> $(document).ready(function(){ function force(){ doStuffHere...} $('#joda').click(function () { $('img').show(); setInterval('force()',500); }); }); if I click #joda I got the Error: force is not defined. hmmm. I have some basic misunderstanding here... THX in advance! cheers tlz
[jQuery] Re: Countdown - my first plugin
I did thought about that But within 1 sec window, wont be a little anoying ? Imagine 5 or 10 of that in the same page, too much annimation... :) For a optional resource is interisting, I will investigate how to. Thanks Feijó - Original Message - From: Glen Lipka To: jquery-en@googlegroups.com Sent: Sunday, January 13, 2008 4:28 PM Subject: [jQuery] Re: Countdown - my first plugin Maybe consider a visual display similar to this: http://commadot.com/jquery/slotMachineEffect.php So that the numbers that countdown don't just blink, they animate. Glen On Jan 12, 2008 3:59 AM, Feijó < [EMAIL PROTECTED]> wrote: Check it out! http://plugins.jquery.com/project/countdown Still has some improvment to do I would love some suggestions, tips, changes, even in the comments on the code lol Didnt made the help nor demo yet, will probably this weekend This component countdown a value in seconds, i.e. 200 will show 03:20 and decrease it every second (or configurabled with another inverval). Naturaly can work with several different values in the same page, thats why I created that. that configurability is not working properly, who has time to look at it, please tell me how to improve regards Feijó
[jQuery] Countdown - my first plugin
Check it out! http://plugins.jquery.com/project/countdown Still has some improvment to do I would love some suggestions, tips, changes, even in the comments on the code lol Didnt made the help nor demo yet, will probably this weekend This component countdown a value in seconds, i.e. 200 will show 03:20 and decrease it every second (or configurabled with another inverval). Naturaly can work with several different values in the same page, thats why I created that. that configurability is not working properly, who has time to look at it, please tell me how to improve regards Feijó
[jQuery] Re: toggle function on checkbox
Why dont you use .click trigger? Something like $("#precheck").click( function () { $(".preregbox").toggle('slow'); }, ); On Jan 8, 2008 4:05 PM, jpl80 <[EMAIL PROTECTED]> wrote: > > > I'm having a problem with toggle() and was hoping someone could help > me. Using the toggle function on a checkbox seems to have disabled the > checkbox's ability to check on and off. > > http://tinyurl.com/yo9onz http://tinyurl.com/yo9onz > > My code: > > > $(document).ready(function(){ > $("#precheck").toggle( > function () { >$(".preregbox").show('slow'); > }, > function () { >$(".preregbox").hide('slow'); > } > ); > }); > -- > View this message in context: > http://www.nabble.com/toggle-function-on-checkbox-tp14695340s27240p14695340.html > Sent from the jQuery General Discussion mailing list archive at Nabble.com > . > > -- baita abraço Feijó
[jQuery] cluetip question
With non-link element, why can't I use without ajax? I try that: $('h4').cluetip(); Hover over me. Didnt work, only like this works: $('h4').cluetip({attribute: 'id', hoverClass: 'highlight'}); Hover over me. Can't I just set a tip without ajax? With the first one runs. thanks Feijó
[jQuery] mery christmas!
and great 2008 to ya'll !! huge hug baita abraço Feijó
[jQuery] Re: calling ajax with url parameter
I like to set my own attributes, like that click here $(document).ready(function() { $('#item1').click(function() { $('#result').load('process.php', {a: $(this).attr('a'), b: $(this).attr('b') }); return false; }); }); hugs Feijó - Original Message - From: "dimmex" <[EMAIL PROTECTED]> To: "jQuery (English)" Sent: Tuesday, December 04, 2007 3:53 AM Subject: [jQuery] calling ajax with url parameter Hello, I'm pretty new to jQuery and want to implement some ajax. I have a html like this: click here After learning jQuery a little while, I got the way to call ajax something like this: $(document).ready(function() { $('#item1').click(function() { $('#result').load('process.php', {parameters will be passed here}); return false; }); }); from what I learnt, the parameters will be passed in format: {'a' : value, 'b': value} My question, can I get the href part or specifically only the parameter (only 'a=1&b=2') and passing it and in my process.php I can access it just like $_POST variables ( $_POST['a'] and $_POST['b'] ) ? what jQuery function do I need to do that? what I'm thinking is something like $('#result').load('process.php', extract(getparameter(url))); I hope my question is clear enough :) any help is appreciated. Thanks. Dimm
[jQuery] Re: Working with cluetip and validate
I found that a few minutes after sent my msg to this group :) I have to thank you Karl a lot for that fabulous plugin! Feijó - Original Message - From: Karl Swedberg To: jquery-en@googlegroups.com Sent: Monday, November 19, 2007 3:17 PM Subject: [jQuery] Re: Working with cluetip and validate Hi Alessandro, You can already set a custom attribute with clueTip. Something like this, perhaps: $('mylink').cluetip({splitTitle: '|', titleAttribute: 'cluetip'}) Hope that helps. --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Nov 19, 2007, at 7:04 AM, Alessandro Feijó wrote: I just set a form using both plugins (jquery.validate.js and jquery.cluetip.js) Both use Title to set his content. So, a natural conflit is heppening. The cluetip title (before the pipe) its been the actualy content of validate red warning string. How can I circunvent that? If I can give a sugestion, both plugins could offer the possibility to set a custom attribute: or, more simple to read: I use custom attr in my drupal project without problems! Very pratical Thanks Feijó
[jQuery] Re: Working with cluetip and validate
Great tip!! Thanks, Josh Feijó - Original Message - From: Josh Nathanson To: jquery-en@googlegroups.com Sent: Monday, November 19, 2007 11:01 PM Subject: [jQuery] Re: Working with cluetip and validate You do not have to use inline validate messages. You can use the configuration variable for this: $("#myform").validate({ messages: { myfield: "you must enter a value." } }); -- Josh - Original Message - From: Alessandro Feijó To: jquery-en@googlegroups.com Sent: Monday, November 19, 2007 4:04 AM Subject: [jQuery] Working with cluetip and validate I just set a form using both plugins (jquery.validate.js and jquery.cluetip.js) Both use Title to set his content. So, a natural conflit is heppening. The cluetip title (before the pipe) its been the actualy content of validate red warning string. How can I circunvent that? If I can give a sugestion, both plugins could offer the possibility to set a custom attribute: or, more simple to read: I use custom attr in my drupal project without problems! Very pratical Thanks Feijó
[jQuery] Re: (this) question
Indeed!!! Nice style Will adopt it thanks Feijó - Original Message - From: "Andy Matthews" <[EMAIL PROTECTED]> To: Sent: Monday, November 19, 2007 4:42 PM Subject: [jQuery] Re: (this) question Using the $ in a js variable (in the jQuery world) is generally a sign that the variable contains a jQuery object. It's just a nice way of helping the programmer know what to expect. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Feijó Sent: Monday, November 19, 2007 12:40 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: (this) question why do you use $ in JS variables? get used to after long years in php? :) Feijó - Original Message - From: "Michael Geary" <[EMAIL PROTECTED]> To: Sent: Monday, November 19, 2007 3:14 PM Subject: [jQuery] Re: (this) question Every function call has its own "this" - that's just the way JavaScript works. To fix it, assign "this" - or better yet in your case, "$(this)" - into a variable outside the click function. We can also avoid the repeated calls to the same selector by using another variable: $('.wallpaper').each(function(){ var $wallpaper = $(this); var $anim = $wallpaper.find('.images > .anim').hide(); $wallpaper.find('.buttons > .anim').click(function(event){ $('p').toggleClass( 'rainbows' ); $wallpaper.find('p').toggleClass('fraggle'); // $anim.show(); // $wallpaper.find('.images > .static').hide(); return false; }) }); -Mike
[jQuery] Re: (this) question
why do you use $ in JS variables? get used to after long years in php? :) Feijó - Original Message - From: "Michael Geary" <[EMAIL PROTECTED]> To: Sent: Monday, November 19, 2007 3:14 PM Subject: [jQuery] Re: (this) question Every function call has its own "this" - that's just the way JavaScript works. To fix it, assign "this" - or better yet in your case, "$(this)" - into a variable outside the click function. We can also avoid the repeated calls to the same selector by using another variable: $('.wallpaper').each(function(){ var $wallpaper = $(this); var $anim = $wallpaper.find('.images > .anim').hide(); $wallpaper.find('.buttons > .anim').click(function(event){ $('p').toggleClass( 'rainbows' ); $wallpaper.find('p').toggleClass('fraggle'); // $anim.show(); // $wallpaper.find('.images > .static').hide(); return false; }) }); -Mike
[jQuery] Working with cluetip and validate
I just set a form using both plugins (jquery.validate.js and jquery.cluetip.js) Both use Title to set his content. So, a natural conflit is heppening. The cluetip title (before the pipe) its been the actualy content of validate red warning string. How can I circunvent that? If I can give a sugestion, both plugins could offer the possibility to set a custom attribute: or, more simple to read: I use custom attr in my drupal project without problems! Very pratical Thanks Feijó
[jQuery] Re: ClueTip Question...
its monologue permited in this group? lol Feijó - Original Message - From: "Rick Faircloth" <[EMAIL PROTECTED]> To: Sent: Sunday, November 18, 2007 3:03 AM Subject: [jQuery] Re: ClueTip Question... > > Well... I guess asking a question spawns an answer. > I realized that some of the ClueTip options were > surrounded by single quotes. When I added those > around the option, positionBy: 'auto', it worked fine. > > Actually, positionBy: 'mouse' seems to work best. > > Thanks for the good work, Karl! > > Rick > > PS - It's sorta strange for this entire thread to > be a conversation with myself... well, it is 12:02 am... > > >> -Original Message- >> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On >> Behalf Of Rick >> Faircloth >> Sent: Saturday, November 17, 2007 11:39 PM >> To: jquery-en@googlegroups.com >> Subject: [jQuery] Re: ClueTip Question... >> >> >> I should have looked a little harder. there it was in "black & white". >> >> So, I did find the info about positioning the ClueTip and decided that >> "auto" would probably be what I'm looking for, but when I put >> "positionBy: auto" in the ClueTip options, it disabled the ClueTip. >> The "hidden div" part of the ClueTip just sits on the page. When I >> remove >> the positionBy option, all works normally. >> >> I changed that option in the "custom-cluetip.js" file, which has this in >> it: >> >> $(document).ready(function() { >> >> $('a.load-local').cluetip({ >> >> local: true, >> cluetipClass: 'jtip', >> cursor: 'pointer', >> arrows:true, >> dropShadow: true, >> width: 410 >> >> }); >> >> }); >> >> Suggestions? >> >> Rick >> >> >> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On >> Behalf Of Rick >> Faircloth >> Sent: Saturday, November 17, 2007 11:26 PM >> To: jquery-en@googlegroups.com >> Subject: [jQuery] ClueTip Question... >> >> Hey, Karl. (or anyone else who might know) >> Did you ever get ClueTip coded so that it will >> show top, bottom, left, and right, depending on >> what direction a ClueTip will best fit the screen? >> I just put the latest version on the plug-in >> page on a site, and if I scroll the page so that >> the ClueTip link is at the top of the page, it still >> puts the ClueTip out to the left where part of it >> is cut off at the top, instead of at the bottom >> where there's plenty of room for it to show. >> Rick >>
[jQuery] Re: Close/hide div on click outside
Can you provide an code of your attempt? It may be simple, or not. Depend on your page. You could set a master div, then just bind a click event on it to hide the target div target content master content $('#master).click(function() { $('#target).fadeOut('slow'); }); Feijó - Original Message - From: "Codex" <[EMAIL PROTECTED]> To: "jQuery (English)" Sent: Friday, November 16, 2007 2:45 AM Subject: [jQuery] Close/hide div on click outside > > I've searched the posts and the web but I can't find a clear answer/ > solution. I hope someone can answer this one: > > I want to hide a div when there's a click anywhere outside of the div. > How would one do this? > > Gav >
[jQuery] Re: hiding checkbox AND label?
Try this $('h3').click(function() { $(this).next('.details').find("input:checkbox").not(":checked").parent().hide(); }); Feijó - Original Message - From: "Priest, James (NIH/NIEHS) [C]" <[EMAIL PROTECTED]> To: Sent: Wednesday, November 14, 2007 4:56 PM Subject: [jQuery] hiding checkbox AND label? Argh - I'm close - but so far I can't seem to hide BOTH the checkbox and label: $('h3').click(function() { $(this).next('.details').find("input:checkbox").not(":checked").hide(); }); OR $('h3').click(function() { $('input:checkbox').each(function() { if (!this.checked) { $(this).next().hide(); } }); }); Both hide the checkbox only. The label remains!! I've tried a few things with parent().next() but either I can remove the checkbox OR the label but never both?? I'm sure I'm missing something simple here Thanks, Jim
[jQuery] RES: [jQuery] autocomplete - show all
Who handle the search isnt the plugin, its the SQL When your PHP (?) function recieves the plugin request for autocomplete list, check if the string input by user is *, then return all rows. Something like: If (!$string=='*') $where .= " and yourfield like '$string%'); The performance will not be good if the list contain 1000's -Mensagem original- De: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] Em nome de rolfsf Enviada em: quinta-feira, 8 de novembro de 2007 23:30 Para: jquery-en@googlegroups.com Assunto: [jQuery] autocomplete - show all I'm just starting to research autocomplete plugins. We have a case where in certain situations a user may not know enough about what they're looking for to successfully type a few characters and get close to the right result (unpredictable combinations of letters and numbers). In this case, we'd like there to be a way to scroll through the entire (long) list to find the right item. Perhaps they type a wildcard character like * Can this be done with either of the main jquery autocomplete plugins? Thanks -- View this message in context: http://www.nabble.com/autocomplete---show-all-tf4775084s27240.html#a13659839 Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: ajax "kill" jQuery script after load
I have the same problem, had been searching around how to fix that for 2 days I dont wanna use iframe Do I need to use eval ? how? Thanks Feijó - Original Message - From: "ryznar" <[EMAIL PROTECTED]> To: Sent: Wednesday, November 07, 2007 12:51 PM Subject: [jQuery] ajax "kill" jQuery script after load Hi :) a have some problem on page http://www.ryznar.eu I use jQuery and LocalScroll plugin hen you click one ot this options: start umiejętności doświadczenie wykształcenie pozostałe page is scrolling then when you click menu projekty and come back to o mnie and again try click one of otpions: start umiejętności doświadczenie wykształcenie pozostałe content isn't scrolling but "jump" into some section of content [but only in FF and IE, in Opera nothing's happen] even I put #navigation in non-loaded place like this http://ryznar.eu/index2.php the situation is the same, content still jump not scroll after ajax loading how can I change it to be scrolling after ajax loading ? Please help me Sorry for my english - http://www.ryznar.eu Paweł Ryznar - junior webdeveloper -- View this message in context: http://www.nabble.com/ajax-%22kill%22-jQuery-script-after-load-tf4754035s27240.html#a13594568 Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] stick sidebar
I'm having problem to find out how to do that Dont know the keywords to google it I need an sidebar (like the one on the right at mininova.org) always showing up at the top of the browser, no mater what part of the page the user are. How can I do that? What's the event? thanks Feijó
[jQuery] Re: Checkboxes and radios
wow!!! What a builtfull code :)) Worked perfectly Thanks a lot, Wizzud Hope I get that advanced in jquery soon []s Feijó On Oct 26, 9:04 pm, Wizzud <[EMAIL PROTECTED]> wrote: > OK, so they're actually children of the grandparents (aunts/ > uncles?)... > > var checkBoxes = $('.form-checkbox').click(function(e, triggered){ > $(this).parent().siblings('input:radio')[0].disabled = > triggered ? this.checked : !this.checked; > }); > $('#toggle').click(function(){ checkBoxes.trigger('click', > [true]); }); > $('#all').click(function() > { checkBoxes.not(':checked').trigger('click', [true]); }); > $('#none').click(function() > { checkBoxes.filter(':checked').trigger('click', [true]); }); > > On Oct 26, 7:01 pm, Feijó <[EMAIL PROTECTED]> wrote: > > > Ops, sorry > > > I add this jquery to dynamicaly insert the radio > > > $(document).ready(function() { > > $('.form-checkbox').parent().parent().prepend(' > name=radio class=radio disabled> '); > > > }); >
[jQuery] Re: Checkboxes and radios
Ops, sorry I add this jquery to dynamicaly insert the radio $(document).ready(function() { $('.form-checkbox').parent().parent().prepend(' '); }); On Oct 26, 3:28 pm, Wizzud <[EMAIL PROTECTED]> wrote: > And the radio buttons would be where? > > On Oct 26, 11:35 am, Feijó <[EMAIL PROTECTED]> wrote: > > > Here it is > > > If any checkbox is clicked, it needs do enable the radio next to it. > > > In the bottom I have 3 links to check it all, uncheck it all, or > > toggle. In those cases the radios need to respond as well. > > > That's my last jquery attempt: > > > $('.form- > > item:checkbox:not(:checked)').siblings(':radio').removeAttr('disabled'); > > > Thanks! > > > Rules > class="form-item"> > > Values: > > > > > id="edit-options-1" value="1" class="form-checkbox" /> Option 001 > label> > > > > > > > > id="edit-options-2" value="2" class="form-checkbox" /> Option 002 > label> > > > > > > > id="edit-options-3" value="3" class="form-checkbox" /> Option 003 > label> > > > > > > > id="edit-options-4" value="4" class="form-checkbox" /> Option 004 > label> > > > > > > > > id="edit-options-5" value="5" class="form-checkbox" /> Option 005 > label> > > > > > > > id="edit-options-6" value="6" class="form-checkbox" /> Option 006 > label> > > > > > > > id="edit-options-7" value="7" class="form-checkbox" /> Option 007 > label> > > > > > > > > id="edit-options-8" value="8" class="form-checkbox" /> Option 008 > label> > > > > > > > id="edit-options-9" value="9" class="form-checkbox" /> Option 009 > label> > > > > > > > id="edit-options-10" value="10" class="form-checkbox" /> Option 010 > label> > > > > > > > > > Inverter > id=all>Todos Nenhum > > > On Oct 25, 8:53 pm, Wizzud <[EMAIL PROTECTED]> wrote: > > > > Need a bit more information! > > > If you don't show us some HTML it's a bit difficult to second guess > > > the relationship between checkbox and radio. > > > > On Oct 25, 8:34 pm, "Alessandro Feijó" <[EMAIL PROTECTED]> wrote: > > > > > I'm trying to control N checkboxes, when one is selected or unselected, > > > > I > > > > need to enable/disable a radio next to the checkbox > > > > > something like this: > > > > > ( ) [ ] > > > > (o) [x] > > > > > the marked one, turn the radio clickable > > > > > I start this code > > > > > $('.form-checkbox').each( function() { > > > > $('.form-checkbox:radio').attr('disabled', $(this).attr('checked')); > > > > }); > > > > > It returns every checkbox, but I cant figure out how to find the radio > > > > object from each one > > > > > Thanks in advance for any tip :) > > > > > huge hug > > > > Feijó
[jQuery] Re: Checkboxes and radios
Here it is If any checkbox is clicked, it needs do enable the radio next to it. In the bottom I have 3 links to check it all, uncheck it all, or toggle. In those cases the radios need to respond as well. That's my last jquery attempt: $('.form- item:checkbox:not(:checked)').siblings(':radio').removeAttr('disabled'); Thanks! Rules Values: Option 001 Option 002 Option 003 Option 004 Option 005 Option 006 Option 007 Option 008 Option 009 Option 010 Inverter Todos Nenhum On Oct 25, 8:53 pm, Wizzud <[EMAIL PROTECTED]> wrote: > Need a bit more information! > If you don't show us some HTML it's a bit difficult to second guess > the relationship between checkbox and radio. > > On Oct 25, 8:34 pm, "Alessandro Feijó" <[EMAIL PROTECTED]> wrote: > > > I'm trying to control N checkboxes, when one is selected or unselected, I > > need to enable/disable a radio next to the checkbox > > > something like this: > > > ( ) [ ] > > (o) [x] > > > the marked one, turn the radio clickable > > > I start this code > > > $('.form-checkbox').each( function() { > > $('.form-checkbox:radio').attr('disabled', $(this).attr('checked')); > > }); > > > It returns every checkbox, but I cant figure out how to find the radio > > object from each one > > > Thanks in advance for any tip :) > > > huge hug > > Feijó
[jQuery] Checkboxes and radios
I'm trying to control N checkboxes, when one is selected or unselected, I need to enable/disable a radio next to the checkbox something like this: ( ) [ ] (o) [x] the marked one, turn the radio clickable I start this code $('.form-checkbox').each( function() { $('.form-checkbox:radio').attr('disabled', $(this).attr('checked')); }); It returns every checkbox, but I cant figure out how to find the radio object from each one Thanks in advance for any tip :) huge hug Feijó
[jQuery] Re: disable effect in images
Nice idea!! Will try that one :) Thanks, Wizzud On Oct 19, 7:31 pm, Wizzud <[EMAIL PROTECTED]> wrote: > The simplest way is to reduce it's opacity ... > > jQuery('img').css({opacity:0.5}); > > On Oct 19, 10:31 am, "Alessandro Feijó" <[EMAIL PROTECTED]> wrote: > > > Its possible to turn any image to gray simulating a disabled effect?? > > > I'm trying to find it out but don't know what are the keywords to search for > > > Thanks! >
[jQuery] disable effect in images
Its possible to turn any image to gray simulating a disabled effect?? I'm trying to find it out but don't know what are the keywords to search for Thanks! -- huge hug Feijó