[jQuery] toggle anonymous function doesn't like object value in .css()

2009-11-25 Thread Magnificent
Hello all, I'm running into a problem where it looks like the toggle() method's anonymous functions don't like object values in the css() method. I'm not having any problems without this outside my toggle(), I'm doing stuff like: zip.css({ 'border': + zip_data.no_error.border,

[jQuery] Re: toggle anonymous function doesn't like object value in .css()

2009-11-25 Thread Magnificent
So it looks like it's not liking '1px solid' in my data object value. If I change things to: var zip_data = { no_error: { border:'#e1e1e1', background:'#f2f3f2' } } zip.css({ 'border': '1px solid ' + zip_data.no_error.border, 'background':

[jQuery] Closure/scope

2009-11-24 Thread Magnificent
Hello all, I'm trying to group some exisiting top-level functions inside a closure (to avoid polluting the global namespace) but I'm not quite getting it to work. First, all the JS works outside my anonymous function, but once I put it in the anonymous function I get an error of crossfade is not

[jQuery] Re: Closure/scope

2009-11-24 Thread Magnificent
Looks like I forgot the end of the anon function, should look like: (function($) { //vars up here that internal functions can access //also using some jquery inside here, so using $ function crossfade() { //body here } //other functions

[jQuery] Re: Closure/scope

2009-11-24 Thread Magnificent
Looks like I didn't forget it, google appears to be stripping it out. Anyways, my anonymous function is closed and invoked with the jQuery object, I just can't include that here.

[jQuery] Re: Closure/scope

2009-11-24 Thread Magnificent
Hi Mike, Thanks much for your reply. I dropped in an anonymous function and that fixed it: cInterval = window.setInterval(function() { crossfade(); }, 5000); I tried calling crossfade() without quotes, but FF gave me a missing quotes error.

[jQuery] Re: :gt and :lt don't accept variable as a parameter?

2009-11-18 Thread Magnificent
 $('#filterlist_wrapper ul li:gt('+left_col+')') On Nov 17, 3:35 pm, Magnificent imightbewrongbutidontthin...@gmail.com wrote: It should read: I'm storing my counts in variables, but it doesn't look like :gt and :lt can accept a VARIABLE value as it's parameter. It works when I put in, say :gt(44

[jQuery] :gt and :lt don't accept variable as a parameter?

2009-11-17 Thread Magnificent
Hello, I'm trying to take a big ul and format it into 2 columns. What I'm doing is cloning the ul, then floating the clone to the left so that gives me my 2 columns (of the same data). I then get a count of the children, split it in half and show the first half in the left column, the 2nd half

[jQuery] Re: :gt and :lt don't accept variable as a parameter?

2009-11-17 Thread Magnificent
It should read: I'm storing my counts in variables, but it doesn't look like :gt and :lt can accept a VARIABLE value as it's parameter. It works when I put in, say :gt(44), but not :gt(left_col) or lt: (right_col) when those variables are numbers.

[jQuery] slideToggle - form elements (checkbox) show before the animation IE6 and IE7

2009-08-20 Thread Magnificent
Hello all, Wondering if anyone has come across this issue I'm having with slideToggle and form elements on the show/hide content - all in IE6 and IE7. IE8 seems to be OK. I am using slideToggle to show/hide some form elements, checkboxes in my case. When the slideToggle is triggered, the

[jQuery] slideToggle - form elements (checkbox) show before the animation IE6 and IE7

2009-08-17 Thread Magnificent
Hello all, Wondering if anyone has come across this issue I'm having with slideToggle and form elements on the show/hide content - all in IE6 and IE7. IE8 seems to be OK (I'm using IETester for all versions of IE here). I am using slideToggle to show/hide some form elements, checkboxes in my

[jQuery] Re: Show/hide on radio button click

2009-08-05 Thread Magnificent
Hey Jules, thanks much, this works like a champ!

[jQuery] Show/hide on radio button click

2009-08-04 Thread Magnificent
Hi all, I'm trying to do a show/hide on a radio button click and I do have it working, but I'd like to make it more...extensible/independent of hard- coding children elements to show hide. My dummy html structure is: pinput type=radio name=donate_by value=by_cause id=causelabel for=causeBy

[jQuery] $(this).text().trim().toLowerCase() throwing errors in IE

2009-07-31 Thread Magnificent
Hi all, I'm running into an IE7 problem where the Visual Studio debugger is saying: Microsoft JScript runtime error: Object doesn't support this property or method Visual Studio is highlighting this line as the problem: if($(this).text().trim().toLowerCase() === subToBold $(this) should be

[jQuery] Re: $(this).text().trim().toLowerCase() throwing errors in IE

2009-07-31 Thread Magnificent
Ah, so basically try something like: var text = $(this).text().toLowerCase(); text = $.trim(text); if(text === subToBold)

[jQuery] Re: $(this).text().trim().toLowerCase() throwing errors in IE

2009-07-31 Thread Magnificent
It's interesting how Firefox 3.5.1 doesn't seem to have a problem with my original syntax/chain.

[jQuery] Re: $(this).text().trim().toLowerCase() throwing errors in IE

2009-07-31 Thread Magnificent
On Jul 31, 10:53 am, Magnificent imightbewrongbutidontthin...@gmail.com wrote: It's interesting how Firefox 3.5.1 doesn't seem to have a problem with my original syntax/chain.

[jQuery] Looking for expand/collapse tree directory navigation

2009-07-25 Thread Magnificent
Hello, I'm looking for an expanding/collapsing tree directory type of navigation and was wondering if someone knows of a good one that's out there and available. What I'm specifically looking for is one that is triggered on the click of a *graphic* that toggles the show/hide. Each text nav

[jQuery] jquery cookie text resizer

2009-07-23 Thread Magnificent
Hello all, I'm doing a text resizer with a cookie to remember the font size level. I'm running into a little problem and was wondering if someone sees something obvious I'm missing. The cookie is being set/read OK and the text resizer works when triggered manually, but it's not being executed

[jQuery] Re: jquery cookie text resizer

2009-07-23 Thread Magnificent
nothing. On Jul 23, 1:07 pm, Magnificent imightbewrongbutidontthin...@gmail.com wrote: Hello all, I'm doing a text resizer with a cookie to remember the font size level. I'm running into a little problem and was wondering if someone sees something obvious I'm missing.  The cookie is being set

[jQuery] Using jQuery.noConflict() with Prototype/Scriptaculous

2009-01-06 Thread Magnificent
Hello all, I'm trying to incorporate jquery into pages with prototype. This is what I'm doing in order: 1) Load prototype/scriptaculous 2) Load jquery 3) Execute jQuery.noConflict(); 4) Execute jquery via (function($) { .. })(jQuery); The jquery code isn't being executed (prototype is),

[jQuery] Re: Using jQuery.noConflict() with Prototype/Scriptaculous

2009-01-06 Thread Magnificent
Hi Erik, thanks for the reply. I've been messing with things and I tried replacing my calls to local versions of prototype/scriptaculous to use google: script src=http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/ prototype.js type=text/javascript/script script

[jQuery] How to trigger jQuery action from a php else branch?

2009-01-04 Thread Magnificent
I have a login system that has a slideup/slidedown show/hide function for a forgot password link. It is hidden by default and it's triggered with toggle(). Works just fine. I have php validation on that forgot password text field so if someone tries to submit with that field empty they get an

[jQuery] Re: How to trigger jQuery action from a php else branch?

2009-01-04 Thread Magnificent
     $('#yourFieldID').show(); // any js you want to fire /script - Jack Magnificent wrote: I have a login system that has a slideup/slidedown show/hide function for a forgot password link.  It is hidden by default and it's triggered with toggle().  Works just fine.  I have php validation on that forgot

[jQuery] Re: How to trigger jQuery action from a php else branch?

2009-01-04 Thread Magnificent
This is the particular code I want to execute. #forgot_pass_link is the click trigger on the web page. //forgot password $('#forgot_pass_link').toggle( function(){ $('#login_forgotpass').css('background', '#dbdbdb');

[jQuery] Re: jQuery crashing older PCs in Firefox 3.0.5?

2008-12-21 Thread Magnificent
a jQuery plugin) * A virus or trojan -Mike From: Magnificent I have an older PC that I use for testing and I've noticed that when I use Firefox 3.0.5 that sometimes the PC crashes.   Not just the browser, but the entire PC.  I've yet to have a single crash in Opera 9.62 testing

[jQuery] Re: jQuery crashing older PCs in Firefox 3.0.5?

2008-12-21 Thread Magnificent
. There is nothing special in the way jQuery does animations compared to any other JS scripts. I use FF on an AMD 2.0ghz with 1gb RAM very often and never have any crashes. - ricardo On Dec 21, 12:39 am, Magnificent imightbewrongbutidontthin...@gmail.com wrote: I have an older PC that I use

[jQuery] jQuery crashing older PCs in Firefox 3.0.5?

2008-12-20 Thread Magnificent
I have an older PC that I use for testing and I've noticed that when I use Firefox 3.0.5 that sometimes the PC crashes. Not just the browser, but the entire PC. I've yet to have a single crash in Opera 9.62 testing the same code. I forget the exact specs of the PC, but I think it's an AMD

[jQuery] Re: Fetch (ajax) a file only if it's been modified

2008-12-18 Thread Magnificent
Does not look to have a Last-Modified header and I'm not seeing the xhr.status code (but I'm obviously getting something in the 200 range back as I'm receiving the data?) This comes via Firebug: Response Headers DateThu, 18 Dec 2008 17:48:49 GMT Server Apache/2.0.52 (CentOS) X-Powered-By

[jQuery] Re: Fetch (ajax) a file only if it's been modified

2008-12-18 Thread Magnificent
For the Last-Modified header, do I need to do something like this in my file that gets fetched every X seconds (livedata_fetch.php in my case): header('Last-Modified: '.gmdate('D, d M Y H:i:s') . ' GMT'); On Dec 18, 9:57 am, Magnificent imightbewrongbutidontthin...@gmail.com wrote: Does

[jQuery] Re: Fetch (ajax) a file only if it's been modified

2008-12-18 Thread Magnificent
I take it back, my livedata_fetch.php is coming back with a 200 status, but I want it coming back with a 304 not modified, right? That means it'll only fetch the file if it's been updated since the last time it was fetched?

[jQuery] Re: Fetch (ajax) a file only if it's been modified

2008-12-18 Thread Magnificent
I'm making some progress, if I include the following: ?php $last_modified = filemtime(test.txt); header(Last-Modified: . $last_modified); ? I get a response header with: Last-Modified 1229624249 If I then wait a bit and make a change to cause test.txt to be updated, I get: Last-Modified

[jQuery] Re: Fetch (ajax) a file only if it's been modified

2008-12-18 Thread Magnificent
to be sent with 304 response header(Last-Modified: $lastmod); ? On Dec 18, 11:15 am, Magnificent imightbewrongbutidontthin...@gmail.com wrote: I'm making some progress, if I include the following: ?php $last_modified = filemtime(test.txt); header(Last-Modified: . $last_modified); ? I get

[jQuery] Fetch (ajax) a file only if it's been modified

2008-12-17 Thread Magnificent
Hi all, I'm trying to fetch a file, but only if the Last-Modified header has changed. What I have is a page that fetches a data file every X seconds (20 in my case) and displays that info to the user. That data file is updated on the server whenever a user takes specific action. It works fine

[jQuery] jQuery and PHP form problem

2008-12-15 Thread Magnificent
Hi all, I've been messing around with jQuery (which is pretty cool), but I'm having an issue with jQuery form binding and PHP $POST variable processing. Basically, what I'm running into is my php branch is not executed while the form has an id (jQuery is taking precendence). If I remove the id,

[jQuery] Re: jQuery and PHP form problem

2008-12-15 Thread Magnificent
I'm not sure I understand. If you're saying change my inputs to: input id=search name=search type=text input id=btnSearch name=btnSearch type=submit value=Go That has no effect, the jQuery form binding still trumps the php $POST branch. On Dec 15, 4:43 pm, Mike Alsup mal...@gmail.com wrote:

[jQuery] Re: jQuery and PHP form problem

2008-12-15 Thread Magnificent
I'm wondering if echo'ing the jQuery script inside my PHP code will work. If I do: if($_POST['search_button']){ echo script type='text/javascript' alert('inside post branch'); /script ; } That works fine, but if I copy/paste in my jQuery code I want

[jQuery] Trigger same function from 2 different events

2008-12-15 Thread Magnificent
I want to trigger the same function from 2 different events. Is the following the best way to do this? Note in this code snippet, the 2 separate events are page load/button click. button id=buttonClick me/button script type=text/javascript src=http://ajax.googleapis.com/ajax/

[jQuery] Re: jQuery and PHP form problem

2008-12-15 Thread Magnificent
separately, it's getting the PHP integrated that I'm having problems with. On Dec 15, 6:31 pm, brian bally.z...@gmail.com wrote: On Mon, Dec 15, 2008 at 8:18 PM, Magnificent imightbewrongbutidontthin...@gmail.com wrote: I'm wondering if echo'ing the jQuery script inside my PHP code will work

[jQuery] Re: jQuery and PHP form problem

2008-12-15 Thread Magnificent
Yes, the id on the form element. If I remove that, then var_dump $_POST, I'm definitely getting my form info, for example here's a var_dump of my latest search: array(2) { [search_field]= string(7) leopard [search_button] = string(2) Go } But then I already knew that because without the id I

[jQuery] Re: jQuery and PHP form problem

2008-12-15 Thread Magnificent
I made a quick standalone page and it seems to work fine. Form submit throws an alert then PHP echo's whatever you enter in the field. It looks I have issues elsewhere in my code? Here's the standalone page code: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://

[jQuery] Re: jQuery and PHP form problem

2008-12-15 Thread Magnificent
No, it just sends a request/formats 3rd party info based on whatever the user searches for. On Dec 15, 7:33 pm, brian bally.z...@gmail.com wrote: $('#form_search').bind('submit', function() {         alert('form sumitted'); }); What does your actual function do? Does it send anything to

[jQuery] Re: jQuery and PHP form problem

2008-12-15 Thread Magnificent
sticky (so it would use the last entry, not the default value!) and there might have been another thing. Ugh, I've really tweaked a lot of stuff this evening. But, it looks like it's all working now. On Dec 15, 7:57 pm, Magnificent imightbewrongbutidontthin...@gmail.com wrote: No, it just sends