[jQuery] Re: click fires twice

2009-01-29 Thread Ryura
Sounds like you've bound the event twice. Can we see the whole page? On Jan 29, 8:03 pm, brian bally.z...@gmail.com wrote: both jquery-1.3.1 and 1.2.6 on FF No beginner here, but I'm absolutely stumped. The following function is firing twice. There are no other event handlers involved (and,

[jQuery] Re: Smarter way to write this repetitive code?

2008-12-22 Thread Ryura
Right - .each() is still being called internally. You'd need to bind the event to a parent element. On Dec 22, 7:24 pm, Kean shenan...@gmail.com wrote: dbzz, IMO, your code still add a listener to each of the .headline var txt = $('.article-text'); var $hl = $('.headline');

[jQuery] $({key: value}) functionality?

2008-12-22 Thread Ryura
I'm looking into ways to manipulate Javascript objects using jQuery, and I was wondering if there's anything I can do with the selectors when passing an object to jQuery. For example, $({ obj1: { name: a, prop: x }, obj2: { name: b, prop: y }, obj3: { name: c, prop: z } }).filter('[name=a]');

[jQuery] Re: $({key: value}) functionality?

2008-12-22 Thread Ryura
=foo2]') This does what I require. On Dec 22, 10:05 pm, Ryura yoyobo...@gmail.com wrote: I'm looking into ways to manipulate Javascript objects using jQuery, and I was wondering if there's anything I can do with the selectors when passing an object to jQuery. For example, $({ obj1: { name

[jQuery] Re: Can I access and change content loaded dynamically after jQuery.js?

2008-12-21 Thread Ryura
Try the liveQuery plugin: http://docs.jquery.com/Plugins/livequery On Dec 21, 1:20 pm, suntrop sprungm...@googlemail.com wrote: Sorry for that, but how can I bind the event after I call $ (#content).load(loadLink,,hideLoader);? Do I have to replace hideLoader with a function that contains

[jQuery] Re: Smarter way to write this repetitive code?

2008-12-20 Thread Ryura
$('.headline').each(function(i) { $(this).click(function() { $('.article-text:eq('+i+')').fadeIn(); }) })

[jQuery] Re: Having trouble thinking through the how: make node, append (w/o showing), then fade in ...

2008-12-07 Thread Ryura
What about something like this? $(liinput type='text' value= + item.a + //li).hide ().appendTo(#myList).slideDown(fast); On Dec 7, 8:10 pm, nathanziarek [EMAIL PROTECTED] wrote: I'm having a hard time working through this in my mind (and a much harder time in code.) I am receiving a JSON

[jQuery] Re: First steps in jQuery: trying to figure the syntax to mix standard Javascript with jQuery

2008-12-02 Thread Ryura
The glue code is converting your jQuery object. var text = $('div.selectable')[0].getSelection(); alert(text); [0] takes the first element you selected and removes the jQuery methods, replacing them with the usual DOM methods. I don't know how supported .getSelection() is so this code may not

[jQuery] Re: Quick Syntax Error Check

2008-10-28 Thread Ryura
IE hates it for good reason. Proper JSON (and Javascript object declaration) has no trailing comma on the final line. This is one thing IE does right that the other browsers are too giving on. On Oct 28, 5:57 pm, JCQ [EMAIL PROTECTED] wrote: I agree with Tim, that is EXACTLY the problem.  IE

[jQuery] Re: How do I keep from focusing a readonly field?

2008-10-28 Thread Ryura
$('tbodytr:last-childtd:not(.readonly):first- childinput').focus().select(); On Oct 28, 7:07 pm, TimW66 [EMAIL PROTECTED] wrote: Hi all, I have a table that I will usually want to focus the first input box in the first column in the last row.  Something like this: table   tbody  

[jQuery] Re: Selector

2008-10-27 Thread Ryura
evels = $('input[name=Level]:checked + label'); Should do it for you. On Oct 27, 7:13 pm, shapper [EMAIL PROTECTED] wrote: Hello, I have the following: levels = $('input:checked + label'). ... Can I select only the inputs checked but which name is Level? Thanks, Miguel

[jQuery] Re: Change Event Firing Twice

2008-10-24 Thread Ryura
Does ticking one untick another? That would trigger a change event on the one being ticked as well as the one being unticked. On Sep 22, 5:26 pm, sobencha [EMAIL PROTECTED] wrote: My problem is that I seem to be having a change even firing twice. Here are the details I have several

[jQuery] Re: mixing jQuery with regular JavaScript

2008-10-24 Thread Ryura
Alternatively, script $(function(){ window.test = function(){ console.log('hi')} }); /script On Oct 24, 10:11 pm, Mike Alsup [EMAIL PROTECTED] wrote: I'm trying to mix jQuery with some pre-existing JavaScript/HTML, but I'm having what appears to be scope issues. The code I'm

[jQuery] Re: what is difference between $(document).height() and $(window).height() ?

2008-10-21 Thread Ryura
Actually, it seems that the document's height is the entire page's height, while the window height is only the viewing height(ie: what you see at that given time). On Oct 21, 1:00 pm, tallvanilla [EMAIL PROTECTED] wrote: Good question. No difference. Both should give you the exact same result

[jQuery] Re: what is difference between $(document).height() and $(window).height() ?

2008-10-21 Thread Ryura
exactly the same. Try it and let me know if you get different results. JR On Oct 21, 11:25 am, Ryura [EMAIL PROTECTED] wrote: Actually, it seems that the document's height is the entire page's height, while the window height is only the viewing height(ie: what you see at that given time

[jQuery] Re: what is difference between $(document).height() and $(window).height() ?

2008-10-21 Thread Ryura
1.2.6 http://support.zetaboards.com/index/ On Oct 21, 7:06 pm, tallvanilla [EMAIL PROTECTED] wrote: @ryura: What version of jQuery are you using? Anything after 1.2 (possibly earlier) should return identical results for $(window).height() and $ (document).height(). If not, can I see your

[jQuery] Re: Display a div if and id is found

2008-10-17 Thread Ryura
Actually, you don't need the 0 part. 0 evaluates to false anyway, so just if($(#whatev).length) works fine On Oct 17, 4:09 pm, Mauricio \(Maujor\) Samy Silva [EMAIL PROTECTED] wrote: Another approach: if ( $('#FirstDiv').length 0 ) { $('#SecondDiv').show(); }

[jQuery] Re: Trying to capture the html code from $('body')

2008-10-10 Thread Ryura
.html is actually a function. You need to replace all instances of .html with .html() for example: testArray = myRe.exec( $(#wrap).html ); // Collect found words in testArray Should be: testArray = myRe.exec( $(#wrap).html() ); // Collect found words intestArray On Oct 10, 4:07 

[jQuery] Re: Valid jQuery on Development fails on Production

2008-10-06 Thread Ryura
You have some unclosed tags (the last tr and td). Try closing those. On Oct 6, 6:06 pm, rich [EMAIL PROTECTED] wrote: I am writing a fairly basic script using jQuery. However, the script behaves differently depending on whether I am running it on my local Web server (localhost) or on a

[jQuery] Re: Designing ajax applications / DOM issues

2008-09-27 Thread Ryura
You'll want to look into the Live Query plugin: http://plugins.jquery.com/project/livequery/ On Sep 27, 2:55 pm, silk.odyssey [EMAIL PROTECTED] wrote: I am getting started with jQuery and I think I understand the basics. I want to get into ajax and while I can communicate with the server I

[jQuery] Re: missing ) after argument list error

2008-09-22 Thread Ryura
Well, what's the rest of your code? The snippet you've provided is fine, so there must be an issue with another code. On Sep 22, 6:59 pm, switch13 [EMAIL PROTECTED] wrote: Can anyone tell my why this might not work in a separate .js file but it does work from the firebug debugger? On Sep 19,

[jQuery] Re: Can I use a variable to reference object properties?

2008-09-11 Thread Ryura
var myCategory = cheese; $.each(data[myCategory], function(i, item) { do a ton of stuff }

[jQuery] Re: Please examine my code or tell me why it may not be working.

2008-09-04 Thread Ryura
Looks like you never included the actual jQuery file, only the plugin. On Sep 4, 9:21 pm, Ray [EMAIL PROTECTED] wrote: I downloaded the jquery cycle plugin fromhttp://malsup.com/jquery/cycle/ and renamed it jquerycycle.js. I made minor changes to the images but kept everything else pretty

[jQuery] Re: Question about variable declaration

2008-08-19 Thread Ryura
The problem here is that neither of your expressions can EVER evaluate to false. Even if no actual DOM element is selected, you still get an empty (jQuery)array. On Aug 19, 4:34 am, andrea varnier [EMAIL PROTECTED] wrote: Hi :) in your plugins (I'm studying from the best here :))) I often find

[jQuery] Re: An easy question: Selecting DOM nodes that doesn't have class active

2008-08-19 Thread Ryura
Also, .hide() does the same as setting the CSS to display:none. On Aug 19, 10:24 am, Karl Swedberg [EMAIL PROTECTED] wrote: On Aug 19, 2008, at 8:09 AM, Giovanni Battista Lenoci wrote: Hi, I have this code: ul li  ul class=menu  li.../li /li li  ul class=menu active  

[jQuery] Re: how to insert javascript code instead of text with .before() or anything else jQuery has?

2008-08-19 Thread Ryura
That should've worked. Can you provide a test-case page? On Aug 19, 12:02 am, Cormac [EMAIL PROTECTED] wrote: Could you please tell me how to do it properly? I tried writing \/ script, but it didn't work. Thanks! On Aug 19, 4:38 am,Ryura[EMAIL PROTECTED] wrote: .before('google code here

[jQuery] Re: getJSON - how do you make it work?

2008-08-18 Thread Ryura
Is it actually accessing the file correctly? I'd say provide a test case or check yourself with Firebug. On Aug 18, 6:00 am, Jon Sidnell [EMAIL PROTECTED] wrote: Hi I'm trying to get some JSON content using the $.getJSON function, but it just won't work!! I started out using ASP.NET to

[jQuery] Re: how to insert javascript code instead of text with .before() or anything else jQuery has?

2008-08-18 Thread Ryura
.before('google code here') You'll want to escape any /script's. On Aug 18, 6:49 pm, Cormac [EMAIL PROTECTED] wrote: Hello everyone, I'm new to jQuery (and to programming, as a matter of fact). Still, I have this task: find a certain element on an html page and insert a google ad before it

[jQuery] Re: Some If/Then help

2008-07-11 Thread Ryura
Richard's didn't work because he formed an array instead of an object like he was planning. Replacing the [ ... ] with { ... } should've made it work. On Jul 11, 4:13 pm, brendan [EMAIL PROTECTED] wrote: Thanks Richard, I couldn't get yours to work (my js knowledge is pathetically rusty) and

[jQuery] Re: How to know when you can't scroll any further

2008-07-10 Thread Ryura
$(element).scroll(function() { if($(element).scrollTop == $(element).scrollHeight;) { //do something } }); Untested, but should work. On Jul 10, 9:18 am, fambi [EMAIL PROTECTED] wrote: Thanking you guys in advance for any help/advice... How can I know that I've reached the

[jQuery] Re: How to know when you can't scroll any further

2008-07-10 Thread Ryura
').scroll(function() {      if (this.scrollTop + $(this).height() == this.scrollHeight) {         //  console.log('finished');      } }); --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Jul 10, 2008, at 10:43 AM, Ryura wrote: $(element).scroll(function

[jQuery] Re: Cross domain problems

2008-07-09 Thread Ryura
What JS error were you getting before? On Jul 9, 8:01 am, flycast [EMAIL PROTECTED] wrote: I tried setting document.domain = 'site.com'; It works with a domain of site.com but notwww.site.com. I now get the following message: [Exception... 'Permission denied to call method

[jQuery] Re: getJSON callback not executing

2008-06-26 Thread Ryura
Use a GET request. ?php $prop = '({prop:1})'; $stuff = $_GET[jsoncallback] . $prop; echo $stuff; ? On Jun 26, 2:38 pm, wellmoon [EMAIL PROTECTED] wrote: After more research I discovered for jsonp callbacks to work, the PHP needs to return the name of the function as well as (which

[jQuery] Re: Remove a plugin from elements

2008-06-09 Thread Ryura
Try cloning the object before enabling the plugin, then once the plugin should be disabled replace it with the old object. On Jun 9, 10:38 am, SiCo [EMAIL PROTECTED] wrote: Does anyone have any information on this? Or how to do it other than removing the plugin. i.e. enable table drag and drop

[jQuery] Re: jQuery - clueTip : how to disable it ?

2008-05-25 Thread Ryura
I tend to store the object before tooltip cloned in a variable, then when the tooltip is no longer needed, remove the old object and do a nice after(var); ie: var x = $(#id).clone(); x.clueTip(); $(#id).remove().after(x); On May 25, 9:18 am, Lideln [EMAIL PROTECTED] wrote: Hi all, Is there

[jQuery] Help optimize my code!

2008-05-22 Thread Ryura
Hi everyone, I'm using the curvyCorners plugin, but I only want the corners to be curved when you're hovering over the element. Currently I've got this working but it's terrribly slow and, I fear, inefficient. $(function() { var clone;

[jQuery] Re: jQuery is not defined and fade

2008-05-22 Thread Ryura
You need to use the script src to jQuery before pngfix. script type=text/javascript src=/scripts/jquery-latest.pack.js/ script script type=text/javascript src=/scripts/jquery.pngFix.js/ script On May 22, 7:18 pm, Marcos [EMAIL PROTECTED] wrote: Im getting problems with Jquery. In firefox show

[jQuery] Re: second time jquery is included, kills previously called plugins

2008-05-19 Thread Ryura
You should be able to use jQuery.noConflict() to restore $ to the first instance of jQuery where the plugins are. On May 18, 9:33 pm, Shelane [EMAIL PROTECTED] wrote: if you have this in this order, the plugin call won't work. it will give an error that the plugin function is not defined

[jQuery] Re: How do I write this jquery expression?

2008-05-15 Thread Ryura
var id = $(div.subNav:visible).attr(id); On May 15, 5:28 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I have a number of DIVs with class = subNav. How do I write a Jquery expression to tell me the ID of the DIV with class subNav whose display element is not none (i.e. block)?

[jQuery] Re: document.createElement equivalent in jquery?

2008-05-14 Thread Ryura
$ (document.createElement(div)).attr(id,error).text(json.bad).prependTo(body); That works just fine, obviously you can mold it to your own needs. But indeed, for dynamic script tags use getScript or getJSON. On May 14, 7:48 pm, Carl Von Stetten [EMAIL PROTECTED] wrote: meppum, Take a look

[jQuery] Re: Dynamic Software causing many script loads, how would one handle this?

2008-05-11 Thread Ryura
You *could* have a PHP that you call with $.getScript that'll use the GET variables to spit out specific javascript depending on the plugins, but that's a pretty lame way of doing things. On May 11, 6:58 pm, Lee O [EMAIL PROTECTED] wrote: I have an application that has many plugins, all of

[jQuery] Re: $(document).ready(function() { giving error $ is not a function - what am I doing wrong?

2008-05-08 Thread Ryura
cherry austin - good idea, but not quite :) Kenthumphrey, You've declared jQuery.noConflict(); . This reverts $ back to its previous value, in this case undefined. Either remove jQuery.noConflict() or replace $(document).read(function(){}); with jQuery(document).ready(function($){}); On May 8,

[jQuery] Re: this pointer in Jquery ?

2008-04-26 Thread Ryura
script $(function() { $('form a').click(function() { $(this).parent('form').submit(); return false; }); }); /script a href=# class=img ok/a Try that. On Apr 26, 1:38 pm, mumuri [EMAIL PROTECTED] wrote: Hello for the moment to submit a form ,i do like this (the a href is wrapped in a form

[jQuery] Re: Ajax loading/please-wait image

2008-04-25 Thread Ryura
Instead of using $.post, use $.ajax. This has far more options like beforeSend which will let you control the timing of your image. On Apr 25, 3:29 pm, Shane [EMAIL PROTECTED] wrote: Hi, I want to add your typical 'Loading' animated gif to a page while it's updating via ajax. I'm trying to

[jQuery] Re: Error-Message: is not a function

2008-04-20 Thread Ryura
If I recall correctly, match() always returns an array. Try: catid = $(this).attr(name).match(/\[.+\]/) [0]; On Apr 20, 3:41 pm, Sen [EMAIL PROTECTED] wrote: No ideas?

[jQuery] Re: How can I check what button was clicked

2008-04-05 Thread Ryura
Hola, You'd want to do something like this, probably: $(input).click(function() { var foo = $(this).attr(name); //do something }); Alternatively you could just set a click event to each one. $(#edit_1).click(function() { //do something... }); $(#edit_2).click(function() { //do

[jQuery] Re: Getting started

2008-02-24 Thread Ryura
The documentation is essentially this. http://docs.jquery.com/Main_Page Click the various links under jQuery API Reference. On Feb 24, 4:51 am, jonpren [EMAIL PROTECTED] wrote: Hi, Is there anywhere listed all functions that is added by including jquery? Best Regards - Jon

[jQuery] How to center div horizontally + vertically?

2008-02-18 Thread Ryura
Hi everyone, I'm wondering the best way to center a div horizontally and vertically on the fly. I have: jQuery(a).click(function () { jQuery(#box)./*verticalCenter().*/ add(#loading).show(); }); Basically I just want #box to be centered on the screen and then shown.

[jQuery] Re: Grabbing hash mark

2008-02-10 Thread Ryura
Oh, it occurred to me you might have wanted to find this for a link on the page instead of the current url in the browser. If that's the case, you would do something like this: var b = $('a').attr(href).split(#)[1];

[jQuery] Using JSONP...I'm clueless.

2007-12-24 Thread Ryura
] nsresult: 0x8057001e (NS_ERROR_XPC_JS_THREW_STRING) location: unknown data: no] And nothing executes. What did I do wrong? Thanks, Ryura

[jQuery] Re: Looping ajax requests

2007-12-19 Thread Ryura
Thanks for all the responses everyone! I found an alternate solution (probably proprietary to the situation I was in) but I'll look to use Michael's method in the future.

[jQuery] Looping ajax requests

2007-12-18 Thread Ryura
. Interestingly, it correctly gets 4 pages: http://example.com/5740/1/page.html http://example.com/5740/2/page.html http://example.com/5740/3/page.html http://example.com/5740/4/page.html What is the solution? Thanks, Ryura

[jQuery] iFrames and jQuery

2007-12-04 Thread Ryura
I need to grab content from an iFrame, preferably using jQuery. However, I have no clue how to do this. First off, I'm inserting the iFrame into the page: script $(function() { $(#divID).after(iframe src='http://example.com/test/test.html' name='tesaaat' id='tesaaat' height='0'

[jQuery] How to global a variable?

2007-12-02 Thread Ryura
Right now I have this code: $(function(){ var z=$(#getID).text(); }); document.write(z); Obviously this does not work. But how can I make it work? In the situation I am in, I cannot put all the code inside the function...surely there must be some way. Thanks :)

[jQuery] Re: How to global a variable?

2007-12-02 Thread Ryura
is fully loaded. But you're document.write call is executed as soon as it is parsed. What exactly are you trying to do? Mike On Dec 2, 2007 2:56 PM, Ryura [EMAIL PROTECTED] wrote: Thanks for the reply, Mike. I've tried that but I'm still thrown the error z is not defined $(function

[jQuery] Re: jqGrid update

2007-11-13 Thread Ryura
Wonderful, these client side editing features will be incredibly helpful. Any status on the subgrid suggestion I made (allow you to compare any two columns instead of just id=)? On Nov 12, 3:43 pm, Steve Brownlee [EMAIL PROTECTED] wrote: Fantastic job, Tony. I already know where I can use

[jQuery] Re: This jQuery mailing list

2007-11-11 Thread Ryura
This mailing list is extremely active. It oddly has a very weird lag that makes it seem like it's not active; seems to update every hour or so. I would expect jQuery will stick around, considering all the large corps using it now (even Google is using jQuery!) herbasher wrote: I read somewhere

[jQuery] Re: jqGrid new version

2007-10-22 Thread Ryura
Thanks Tony. I realized I had forgotten to comment the JSON lines that needed to be commented, and also the Javascript was looking for server.php when it was really example.php. It seems to be working fine now! Great job on everything. This is by far one of the best jQuery plugins yet. I'm not

[jQuery] Re: jqGrid new version

2007-10-20 Thread Ryura
Tony, I can't seem to get jqGrid to work. I've looked at all the examples but I must be missing something somewhere. I would appreciate if you would take a look at my PHP. include(dbconfig.php); include(JSON.php); $json = new Services_JSON(); $examp = $_GET[q]; $page = $_GET['page'];

[jQuery] Re: More Superfish Questions

2007-10-07 Thread Ryura
Thanks a ton, Joel! On Oct 6, 10:45 pm, Joel Birch [EMAIL PROTECTED] wrote: On 10/7/07, Ryura [EMAIL PROTECTED] wrote: http://simplythebest.net/scripts/DHTML_scripts/dhtml_script_122.html What I'm asking is if I can do a menu like sample 2 using superfish. Hi Ryura, Sorry for the slow

[jQuery] Re: jqGrid new version

2007-10-07 Thread Ryura
Tony, You've made a nice looking plugin, however the documentation is hard to understand. I'm not sure on how to include a jqGrid onto my site. Would it be possible for you to make a more detailed documentation for those of us who are fairly unfamiliar with PHP?

[jQuery] Superfish Menu Problems - white space

2007-10-04 Thread Ryura
. How can I make it so there is no white space between our ministries and Bus Ministry, but also so it doesn't overlap? Thanks, Ryura

[jQuery] Re: Superfish Menu Problems - white space

2007-10-04 Thread Ryura
Thanks a ton! It works great. On Oct 4, 12:12 pm, Joel Birch [EMAIL PROTECTED] wrote: Hi Ryura, I have to be quick because I am supposed to be asleep, but basically: 1) remove the left padding on .nav li ul 2) change any value that is 9.45em or 7.45em to read: 160px. This is because you