[jQuery] tablesorter help?

2009-08-06 Thread jsrobinson

I have two custom parsers, one works on one column but not on another.
The second parser is working fine.

Example:

http://jquery.magiclamp.net/tablesorter.html

Cols 2 and 3 have the exact same data, use the same parser, and yet
sorting on col 2 works but sorting on col 3 returns

Sorting on 3,NaN and dir NaN time:,3ms
Rebuilt table:,1ms

Any clues?

Thank you for an awesome plugin!!!


[jQuery] Re: Fade in / Out

2009-08-06 Thread CQuick

You might be able to do something similar to the following:

function fadeIn()
{
   $(".myText").fadeIn("slow", function () {
   window.setTimeout("fadeOut();",5000);
   }
}

function fadeOut()
{
   $(".myText").fadeOut("slow");
}

On Aug 6, 6:01 pm, "Dave Maharaj :: WidePixels.com"
 wrote:
> I was wondering how do you make text fade in for a specific amount of time
> then fade out.
>
> I have the fade in / out part..i just cant figure out the duration so it
> stays there after fading in for 5 seconds then fades out.
>
> Dave


[jQuery] Resizing a Thickbox

2009-08-06 Thread steves

Hello,

I've done a bit of googling and some experimentation but I'm a bit lost.  
I'm trying to dynamically resize a modal lightbox created with thickbox.  
So for instance, I draw the div with certain content, say a form with a 
select box.  I'd like to be able to add additional content to the div 
using the select boxes 'onchange' event, like to add images or other 
content below the select box.

Is that possible with thickbox or any other jquery plugin?

Thanks for any help or pointers.


[jQuery] Re: Make event happen after a certain amount of time has passed.

2009-08-06 Thread Simon Vansintjan
Alright, that's pretty much exactly what I had in mind, thanks a bunch.

On Thu, Aug 6, 2009 at 6:19 PM, James  wrote:

>
> Then you can do something like this:
>
> Have a setTimeout (say, executes in 20 seconds) with a callback
> function, say "moveToLocation".
>
> Then you need a way to find out whether the div has been scrolled to
> the certain location or not. That can be done by checking either for
> the user's top/left coordinate of their screen, or you can set a
> variable when the user clicks on that "button".
>
> After the 20 seconds comes by and the moveToLocation function is
> called, it checks for that location (or some variable you set). If
> it's true (meaning, the user has scrolled to the certain location),
> then do nothing. Otherwise, do the auto-scroll.
>
> The idea is that the moveToLocation is called no matter what. It's
> just that whether you do the actual action or not depends on the state
> of things.
>
>
> On Aug 6, 12:09 pm, Simon Vansintjan  wrote:
> > Well, it's pretty theoretical at the moment, so there's no code down, but
> > the idea would be that a div appears, and that the user can click on a
> > button that would scroll the div to a certain location. However, if the
> user
> > doesn't click, I would still want the div to move to that location (in
> case
> > he/she doesn't get it that it would move, dunno).
> >
> >
> >
> > On Thu, Aug 6, 2009 at 6:03 PM, James  wrote:
> >
> > > Use the setTimeout/setInterval functions with some kind of global
> > > counter. If some kind of action/event occurs, the counter would be
> > > refreshed and the function would not execute.
> > > Would you like to specify in more detail what you would like to
> > > achieve?
> >
> > > On Aug 6, 11:43 am, Simon  wrote:
> > > > Hey,
> >
> > > > After a user hasn't triggered an event for a given amount of purple,
> > > > would it be possible to trigger that event anyway?
> >
> > > > I have no idea how to even start looking for this.
> >
> > > > Thanks for any hints/ideas/whatever you can throw my way.
> >
> > > > Simon
> >
> > --
> > simon.vansintjan.org
> >
>


-- 
simon.vansintjan.org


[jQuery] Fade in / Out

2009-08-06 Thread Dave Maharaj :: WidePixels.com
I was wondering how do you make text fade in for a specific amount of time
then fade out.
 
I have the fade in / out part..i just cant figure out the duration so it
stays there after fading in for 5 seconds then fades out.
 
 
Dave 


[jQuery] Re: a selector does not in safari

2009-08-06 Thread James

That selector works fine in Safari and Chrome (WinXP) for me.
Could you post your HTML and any relevant code on what you're doing?

On Aug 6, 7:43 am, hobbyman  wrote:
> I am programming in ASP.NET and using a "hidden" server control which
> basically creates a hidden input in the browser.
>
> The only problem with that is that the client ID is or can be dynamic.
>
> So I have this selector that works in Firefox and IE:
>
> $("[id$='_hidCanEdit']").val()
>
> This DOES NOT work in Safari or Chrome.
>
> I'm using jQuery 1.3.2.


[jQuery] Re: Make event happen after a certain amount of time has passed.

2009-08-06 Thread James

Then you can do something like this:

Have a setTimeout (say, executes in 20 seconds) with a callback
function, say "moveToLocation".

Then you need a way to find out whether the div has been scrolled to
the certain location or not. That can be done by checking either for
the user's top/left coordinate of their screen, or you can set a
variable when the user clicks on that "button".

After the 20 seconds comes by and the moveToLocation function is
called, it checks for that location (or some variable you set). If
it's true (meaning, the user has scrolled to the certain location),
then do nothing. Otherwise, do the auto-scroll.

The idea is that the moveToLocation is called no matter what. It's
just that whether you do the actual action or not depends on the state
of things.


On Aug 6, 12:09 pm, Simon Vansintjan  wrote:
> Well, it's pretty theoretical at the moment, so there's no code down, but
> the idea would be that a div appears, and that the user can click on a
> button that would scroll the div to a certain location. However, if the user
> doesn't click, I would still want the div to move to that location (in case
> he/she doesn't get it that it would move, dunno).
>
>
>
> On Thu, Aug 6, 2009 at 6:03 PM, James  wrote:
>
> > Use the setTimeout/setInterval functions with some kind of global
> > counter. If some kind of action/event occurs, the counter would be
> > refreshed and the function would not execute.
> > Would you like to specify in more detail what you would like to
> > achieve?
>
> > On Aug 6, 11:43 am, Simon  wrote:
> > > Hey,
>
> > > After a user hasn't triggered an event for a given amount of purple,
> > > would it be possible to trigger that event anyway?
>
> > > I have no idea how to even start looking for this.
>
> > > Thanks for any hints/ideas/whatever you can throw my way.
>
> > > Simon
>
> --
> simon.vansintjan.org


[jQuery] Re: Make event happen after a certain amount of time has passed.

2009-08-06 Thread Simon Vansintjan
Well, it's pretty theoretical at the moment, so there's no code down, but
the idea would be that a div appears, and that the user can click on a
button that would scroll the div to a certain location. However, if the user
doesn't click, I would still want the div to move to that location (in case
he/she doesn't get it that it would move, dunno).

On Thu, Aug 6, 2009 at 6:03 PM, James  wrote:

>
> Use the setTimeout/setInterval functions with some kind of global
> counter. If some kind of action/event occurs, the counter would be
> refreshed and the function would not execute.
> Would you like to specify in more detail what you would like to
> achieve?
>
> On Aug 6, 11:43 am, Simon  wrote:
> > Hey,
> >
> > After a user hasn't triggered an event for a given amount of purple,
> > would it be possible to trigger that event anyway?
> >
> > I have no idea how to even start looking for this.
> >
> > Thanks for any hints/ideas/whatever you can throw my way.
> >
> > Simon
> >
>


-- 
simon.vansintjan.org


[jQuery] Re: Make event happen after a certain amount of time has passed.

2009-08-06 Thread James

Use the setTimeout/setInterval functions with some kind of global
counter. If some kind of action/event occurs, the counter would be
refreshed and the function would not execute.
Would you like to specify in more detail what you would like to
achieve?

On Aug 6, 11:43 am, Simon  wrote:
> Hey,
>
> After a user hasn't triggered an event for a given amount of purple,
> would it be possible to trigger that event anyway?
>
> I have no idea how to even start looking for this.
>
> Thanks for any hints/ideas/whatever you can throw my way.
>
> Simon


[jQuery] Re: Click event to load a new page

2009-08-06 Thread Simon

This is something that was bothering me too, and I came to the same
conclusion. How is this for SEO though? Redirecting with Javascript
that is? Does it recognize the link?

Cheers,
Simon

On Aug 6, 3:52 pm, "paul.mac"  wrote:
> Thanks guys - came to the same conclusion shortly after posting the
> question.
>
> Thanks
>
> Paul
>
> On Aug 6, 7:52 pm, "Richard D. Worth"  wrote:
>
> > Use
> > window.location
> > = "index.php?whichPage=slider&whichAct=0&subPage=mixnmingle";
> > - Richard
>
> > On Thu, Aug 6, 2009 at 2:35 PM, paul.mac 
> > wrote:
>
> > > I want to add a click function to an image to laod a new page
>
> > > Tried this but it doesn't work
>
> > > $("#i4").click(function(){
> > >    $(document).attr("href","index.php?
> > > whichPage=slider&whichAct=0&subPage=mixnmingle");
> > >    });
>
> > > The whichAct variable in the query string gets changed, which is why
> > > it isn't just a static ...
>
> > > Any suggestions?
>
> > > Thanks
>
> > > Paul


[jQuery] Make event happen after a certain amount of time has passed.

2009-08-06 Thread Simon

Hey,

After a user hasn't triggered an event for a given amount of purple,
would it be possible to trigger that event anyway?

I have no idea how to even start looking for this.

Thanks for any hints/ideas/whatever you can throw my way.

Simon


[jQuery] Re: Loading jQuery without blocking

2009-08-06 Thread Eric Garside

Honestly, I'd load jQuery regularly, and use the getScript function to
load the rest of the files after domready. I don't know that you're
getting a big performance increase in loading the jquery library in
this method, and it is causing an unknown error, which isn't an ideal
thing to debug. :P

Using jQuery to backload any additional plugins or scripts can be
super useful, but including the jQuery library asynchronously seems
like a poor decision.

On Aug 6, 4:12 am, north  wrote:
> Hi all,
>
> I played around with Steve Souders' techniques of loading JS without
> blocking a bit (I had already been using jQuery's getScript/ajax to
> load bigger chunks of code for certain parts of the site only if
> necessary).
> I tried to use what Nicolas Zakas calls "the best way to load
> JS" (http://www.nczonline.net/blog/2009/07/28/the-best-way-to-load-
> external-javascript/) for the project I work on.
>
> I created the  tag for jquery.js the way described in the
> article, and then tried to use onload/readystate to start loading the
> file with my plugins/functions right after jquery did.
>
> This seems to work fine in all browsers except, you guessed it, IE...
> For some reason IE (I think it happened in 6, 7 and 8) throws me an
> unknown error every now and then.
> It's just a guess, since an "unknown error" doesn't really help me
> debugging, but maybe sometimes the plugin/functions file finishes
> loading before jquery. Even though that should be prevented by
> checking the readystate...
>
> I tried several other approaches then (like adding an ajax call to the
> plugins/functions file at the end of the jquery file, or checking for
> (typeof jQuery == 'undefined') in a loop to try loading the files as
> soon as this statement equals false), but none would work.
>
> Is anybody using one of these non-blocking techniques with jQuery
> successfully?
>
> Thanks


[jQuery] Re: Remove an element but not it's content

2009-08-06 Thread Eric Garside

If you want a cleaner look, you can always just throw together a quick
plugin to handle things:

$.unwrap = function(){
return this.each(function(){
var el = $(this);
el.before( el.html() ).remove();
})
}

Then, simply call:

$('a.tester').unwrap();

And it will unwrap all matching tags.

On Aug 6, 2:10 pm, piter  wrote:
> Hi,
>
> Not sure if sent the post but Solution is quite easy (I wouldnt even
> use jQuery for this):
>
> For re-use purposes create function:
>
> function rmTags(ref){
>     ref.parentNode.insertBefore( document.createTextNode
> (ref.innerHTML),
>                                  ref);
>     return ref.parentNode.removeChild(ref);
>
> }
>
> get reference to Your link, (however You want, jQuery etc.) and invoke
> function on it;
>
> rmTags( $("theLink") );
>
> cheers
>
> ps. not sure if previous was sent so if it's repeated just delete it.


[jQuery] Re: [autocomplete] Dynamic textboxs

2009-08-06 Thread Jake McGraw

Every time you insert a new text field to the DOM, you have to call
autocomplete().

On Wed, Jul 22, 2009 at 10:03 AM, escriba wrote:
>
> I can't put autocomplete working with dynamic textboxs. I have a
> javascript function to add dynamic textboxs, but when i attach the
> autocomplete function to the dynamic textboxs, it doenst work.
>
> Some work that might help this issue:
>
> // Javascript function that adds dynamicly textboxs
>
> var initial_count = new Array();
> var rows_limit = 5; // Set to 0 to disable limitation
>
> function addRow(table_id)
> {
>        var tbl = document.getElementById(table_id);
>        // counting rows in table
>        var rows_count = tbl.rows.length;
>        if (initial_count[table_id] == undefined)
>        {
>                // if it is first adding in this table setting initial rows 
> count
>                initial_count[table_id] = rows_count;
>        }
>        // determining real count of added fields
>        var tFielsNum =  rows_count - initial_count[table_id];
>        if (rows_limit!=0 && tFielsNum >= rows_limit) return false;
>        var input = ' id="bla" size="70" maxlength="250"/>';
>        var remove= '';
>
>        try
>        {
>                var newRow = tbl.insertRow(rows_count);
>                var newCell = newRow.insertCell(0);
>                newCell.innerHTML = input;
>                var newCell = newRow.insertCell(1);
>                newCell.innerHTML = remove;
>        }
>        catch (ex) {
>                //if exception occurs
>                alert(ex);
>        }
> }
>
> // Button that adds textboxs dynamicly
> 
>
> // Jquery autocomplete function call
>
> $(document).ready(function()
> {
>        $("#bla").autocomplete(cities);
> });
>
> NOTICE: I already have this working with fixed textboxs, the only
> problem is with dynamicly added textboxs. Thanks
>


[jQuery] Superfish not embedding

2009-08-06 Thread Jay Sarn

This site:
[url]http://www.prodigytech.com[/url]

I'm having problems with embedding the Superfish vertical menu.

anything found underneath it actually extends to under the superfish
menu.
couldn't find where in the css it might help.


thanks!



[jQuery] Access to variables hidden by scope in a jQuery Javascript function

2009-08-06 Thread Nate

I'm trying to edit an existing jQuery plugin.  As a brief explanation,
this plugin turns a regular Table into a TreeTable - a table with a
hierarchy, similar to a folder browser, except with the additional
columns. So there are parameters for which row is the parent of which
other row, etc.

I'm still pretty new to jQuery so I may be interpreting this
incorrectly, but it looks to me like when I call the jqTreeTable
function on a tbody, it performs its work and returns a new object
that takes the place of the original tbody.

So! To get to my question, I am trying to add "expand all" and
"collapse all" functionality to this plugin, but I'm unsure how to add
these hooks into a closed function, because I need access to internal
variables in the closed function in order to do the work. One solution
that occurred to me was that I might setup some empty links with
unique ids, pass those links into the jqTreeTable function along with
the other parameters, and then alter the links to point at internal
functions that do the work. That doesn't seem very clean (and maybe
impossible?). I also tried altering the function to have another
parameter that specified whether I wanted the table built (initial
call), or whether I wanted to expand or collapse all nodes (subsequent
calls). I couldn't figure out how to access the original internal
variables - I just created a new scope every time I called the
function.

Here is a simplified version of the plugin:

(function(jq){
jq.fn.jqTreeTable = function(options){
var /*a bunch of stuff*/ x,
expandKids = function(num, last){//Expands immediate children,
and their uncollapsed children
jq("#" + tid + num).attr("src", (last) ?
opts.lastOpenImg : opts.openImg);//
for (var x = 0, xl = mapa[num].length; x < xl; x++) {
var mnx = mapa[num][x];
jq("#" + tid + mnx).parents("tr").removeClass
("collapsed");
if (mapa[mnx] && opts.state && jq.inArray(mnx,
collarr) < 0) {If it is a parent and its number is not in the
collapsed array
arguments.callee(mnx, (x == xl - 1));//Expand it.
More intuitive way of displaying the tree
}
}
},
collapseKids = function(num, last){//Recursively collapses all
children and their children and change icon
jq("#" + tid + num).attr("src", (last) ?
opts.lastShutImg : opts.shutImg);
for (var x = 0, xl = mapa[num].length; x < xl; x++) {
var mnx = mapa[num][x];
jq("#" + tid + mnx).parents("tr").addClass
("collapsed");
if (mapa[mnx]) {//If it is a parent
arguments.callee(mnx, (x == xl - 1));
}
};
};

/* build the tree table */
};

return this;
})(jQuery);

which gets called like this:

$("#treet1").jqTreeTable(options);

where 'treet1' is an id on a tbody. I want to write a function that
can make subsequent calls to expandKids and collapseKids that operate
on the same internal variables.

To sum up: it seems to me that this jquery plugin is returning an
altered tbody with a set of closed functions that do the work. I want
to add some functions that I can call externally, but which have
access to the internal arrays and variables of the other function.
Some of these assumptions may be incorrect since I'm no jquery master,
so please enlighten me.

Here is the link to the original project if you feel the need to take
a look:
http://www.hanpau.com/index.php?page=jqtreetable


[jQuery] Re: Click event to load a new page

2009-08-06 Thread paul.mac

Thanks guys - came to the same conclusion shortly after posting the
question.

Thanks

Paul


On Aug 6, 7:52 pm, "Richard D. Worth"  wrote:
> Use
> window.location
> = "index.php?whichPage=slider&whichAct=0&subPage=mixnmingle";
> - Richard
>
> On Thu, Aug 6, 2009 at 2:35 PM, paul.mac 
> wrote:
>
>
>
> > I want to add a click function to an image to laod a new page
>
> > Tried this but it doesn't work
>
> > $("#i4").click(function(){
> >    $(document).attr("href","index.php?
> > whichPage=slider&whichAct=0&subPage=mixnmingle");
> >    });
>
> > The whichAct variable in the query string gets changed, which is why
> > it isn't just a static ...
>
> > Any suggestions?
>
> > Thanks
>
> > Paul


[jQuery] Re: IE6 - Ajax onchange error

2009-08-06 Thread James

Please post some example code.

On Aug 6, 3:20 am, Matthias Kolbe  wrote:
> Hello there :o)
>
> I have a little problem, I have 4 selectboxes with an onchange event.
>
> Onchange should call an ajax request using jquery and reload those
> boxes.
>
> The problem is, that the selectbox I used for selection stays open and
> stops the browser for a view seconds, but just for the first time I
> used one of those. It's like the initialization of jQuery needs the
> time, but why doesn't close this box???
>
> Anybody knows this problem?
>
> greeting,
> matthew


[jQuery] Re: Click event to load a new page

2009-08-06 Thread Richard D. Worth
Use
window.location
= "index.php?whichPage=slider&whichAct=0&subPage=mixnmingle";
- Richard

On Thu, Aug 6, 2009 at 2:35 PM, paul.mac wrote:

>
> I want to add a click function to an image to laod a new page
>
> Tried this but it doesn't work
>
> $("#i4").click(function(){
>$(document).attr("href","index.php?
> whichPage=slider&whichAct=0&subPage=mixnmingle");
>});
>
> The whichAct variable in the query string gets changed, which is why
> it isn't just a static ...
>
> Any suggestions?
>
> Thanks
>
> Paul
>


[jQuery] Re: Malsup Form Plugin and buttons tags

2009-08-06 Thread Mike Alsup

> My buttons are type "submit" and each have values. I believe it could
> be because I have a click event on the button and using ajaxSubmit to
> submit as I have to dynamically add some values into hidden fields.
> How can I submit the button without making another hidden field?

Use ajaxForm instead of ajaxSubmit.


[jQuery] Re: Click event to load a new page

2009-08-06 Thread James

Do you mean that when someone clicks on an image, it just goes to a
different page? (Similar to a normal  tag around an image.)
If so:

$("#i4").click(function() {
document.location.href = 'index.php?
whichPage=slider&whichAct=0&subPage=mixnmingle';
});

Or did you mean "load" an external page within the current page?
In which case you can use the $.load() jQuery ajax function.


On Aug 6, 8:35 am, "paul.mac"  wrote:
> I want to add a click function to an image to laod a new page
>
> Tried this but it doesn't work
>
> $("#i4").click(function(){
>     $(document).attr("href","index.php?
> whichPage=slider&whichAct=0&subPage=mixnmingle");
>     });
>
> The whichAct variable in the query string gets changed, which is why
> it isn't just a static ...
>
> Any suggestions?
>
> Thanks
>
> Paul


[jQuery] Floating DIV

2009-08-06 Thread Just Check

I am looking for something similar to what's there at www.monster.com.
When you search for a job, it shows you the job list (Single line
mode) and when you hover over the Job Title column it pops up an AJAX
dialog with links and further details within it.

Is there some existing plugin that I can use (the closest I could find
was BetterTooltip: http://edgarverle.com/BetterTip/default.cfm). But
the problems I see there are
a.) I do not want to create another page to fetch the contents; I want
the DIV to be in the same page.
b.) I do not see a property that can make the tooltip DIV to remain
open till the user has focus over it.

It would be great if someone can suggest a way to achieve that (as it
seems it should be that tough -- it's just that I'm not getting it).
Another thing to note is I'll be rendering my tabular data using
ASP.Net gridview.

Thanks.


[jQuery] jQuery PNG Fix Plugin Breaks My Other Javascripts In Internet Explorer

2009-08-06 Thread toddtemple2

LINK TO THE JQUERY PLUGIN THAT I AM USING-
http://jquery.andreaseberhard.de/pngFix/

LINK TO THE SITE IN QUESTION-
http://www.securehostserver.info/lcwc/

The link to the site in question shows a navigation bar at the top and
it looks fine in Safari and Firefox on a PC, but looks incorrect in
Internet Explorer 6.0. I have removed the javascript for jQuery and it
works in IE. Can anyone trouble shoot why this is happening? Is there
a conflict between my scripts?

Thanks to everyone in advance.

Todd


[jQuery] Re: Determining if a block is visible

2009-08-06 Thread Richard D. Worth
On Thu, Aug 6, 2009 at 9:27 AM, Joshua Beall  wrote:

>
> On Aug 6, 8:26 am, "Richard D. Worth"  wrote:
> > You can include the pseudo-selector in the same selector, immediately
> after
> > the ID, like so:
> >
> > $("#myDiv:hidden").show();
> > $("#myDiv:visible").hide();
> >
> > Another option would be to use the filter method:
> >
> > $("#myDiv").filter(":hidden").show();
> > $("#myDiv").filter(":visible").hide();
> >
>
>
> That works--I had assumed that if I called something like $
> ("#myDiv:hidden").show(); when myDiv is visible, it would cause a
> problem "object not found" problem since #myDiv:hidden" should return
> nothing, and I then tried to call ".show()" on that "nothing" that was
> returned.


It doesn't return nothing, it returns a jQuery object with 0 elements. Any
method you call will do a .each (like a for loop) on that (empty) set, (not)
calling that method on 0 elements. In other words, that loop will never even
be entered.


>
> In Java/C# I would get a NullReferenceException if I tried something
> like this.  That's where I do most of my development so that's what I
> was expecting.


Annoying, huh? ;)


>
> But I am left asking, why *don't* I get some kind of "object not
> found" error?


This is one of my favorite features of jQuery. It's always safe to call a
jQuery method on a jQuery object. No need to worry about how many elements
may have been returned by your query. 0, 1, 100. It is indeed different than
many other environments, but not all. For example in SQL, if you run the
following query

SELECT * FROM People WHERE age > 42

you might get 0 results, or 1, or 15, or 178. No error if 0 results match
your query. It's still a perfectly valid query. Ok, so how about this one:

DELETE FROM People WHERE age > 42

It might delete 0 records, or 1, or 15, or 178. If you knew of a specific
record that needed to be deleted and 0 records got deleted, sure, that might
be an error. But if no People have an age > 21, there's no error to your
query deleting 0 records. It's doing just what it should. Nothing. That's
kind of how jQuery works. The Q and Query that SQL and jQuery share is no
coincidence.

The other comparison I like to make is to css, which is quite fitting since
jQuery uses css selectors. Imagine you've got a css rule that styles all
paragraphs with a red font:

p { color: red; }

If you've got 0 paragraphs on your page, does your css stop with an
exception? Do you have to do a try/catch around you css rule? No, because
it's declarative. It applies to anything it matches. If it doesn't apply to
anything, it has no effect, and doesn't complain. Same as jQuery, only that
you're applying behavior instead of styling.

But to *really* answer your question, why doesn't jQuery complain loudly if
you tell it to do something to nothing? Because you didn't. If you go back
to your example, it can help to read it backwards. Rather than reading it as
saying "find _this_ element, then call _this_ method on it (barf! element
not found)", you can read it as "hide any elements that are visible and that
have this id" or "show the element with this id if it's not currently
visible" That "if" in the last two translations I gave are implicit in your
query returning at least one element. The else case is do nothing, because
there's nothing to do to nothing. In either of these scenarios, would it
help you if it complained? Would it make your life easier if you had to be
sure to never call a method on an empty result set? That would mean no
chaining, since every method call would need to be safely wrapped in an if
or a try/catch. And at the end of the day your code wouldn't do any more or
less, it would just be less fun and more code to write. You only want to
hide the element if it's visible. You only want to show if it's not. So that
extra required code would just get in your way.

There's a word for this: unobtrusive.

But wait? What if you really *do* care if your query returned 0 results.
What if you want to do something different in this case. Compare .length to
0 in an if statement. That's a lot less common scenario.

Ok, that was a bit long. Sorry to anyone that made it this far :)

- Richard


[jQuery] Click event to load a new page

2009-08-06 Thread paul.mac

I want to add a click function to an image to laod a new page

Tried this but it doesn't work

$("#i4").click(function(){
$(document).attr("href","index.php?
whichPage=slider&whichAct=0&subPage=mixnmingle");
});

The whichAct variable in the query string gets changed, which is why
it isn't just a static ...

Any suggestions?

Thanks

Paul


[jQuery] Re: Remove an element but not it's content

2009-08-06 Thread piter

Hi,

Not sure if sent the post but Solution is quite easy (I wouldnt even
use jQuery for this):

For re-use purposes create function:

function rmTags(ref){
ref.parentNode.insertBefore( document.createTextNode
(ref.innerHTML),
 ref);
return ref.parentNode.removeChild(ref);
}

get reference to Your link, (however You want, jQuery etc.) and invoke
function on it;

rmTags( $("theLink") );

cheers

ps. not sure if previous was sent so if it's repeated just delete it.


[jQuery] Re: Using .live and .each

2009-08-06 Thread James

In that case, $.live is not used for that. $.live works for browser
events like mouseover, mouse clicks, field focus, etc. For your issue,
just put the converter code into a function of its own and run it
again after your ajax is completed and the DOM is modified with the
new content. Otherwise you can try to modify the content before you
actually insert it into the DOM. Is that possible? (Either at the
server-side or after it's received through AJAX.)


On Aug 6, 7:25 am, Nic Hubbard  wrote:
> Sorry, I slipped up while typing.  I meant I am NOW using ajax as
> well.
>
> Using ajax I bring in new content such as:
>
> my iso date
>
> Each time I insert these into the DOM they need to be converted.  The
> above script was used to convert them on page load and did not account
> for content being added using ajax.
>
> On Aug 5, 5:14 pm, James  wrote:
>
> > It's not clear what you want to do. You said you are "not using ajax"
> > but you have content "brought in through ajax". What exactly do you
> > need $.live for? For what browser event?
>
> > On Aug 5, 1:17 pm, Nic Hubbard  wrote:
>
> > > Anyone?  Someone must have done this...
>
> > > On Aug 5, 11:32 am, Nic Hubbard  wrote:
>
> > > > I have a script that runs when I load the page which converts some
> > > > dates.  I am not using ajax as well, and I need to use .live to
> > > > convert the dates that I brought in through ajax.  How would I
> > > > combine .live with .each and make it work?
>
> > > > if ($("span.ISODate").length > 0) {
> > > >         $("span.ISODate").each(function() {
> > > >                 $(this).text(getTFID($(this).text()))
> > > >         });
>
> > > > }
>
>


[jQuery] IE6 - Ajax onchange error

2009-08-06 Thread Matthias Kolbe

Hello there :o)

I have a little problem, I have 4 selectboxes with an onchange event.

Onchange should call an ajax request using jquery and reload those
boxes.

The problem is, that the selectbox I used for selection stays open and
stops the browser for a view seconds, but just for the first time I
used one of those. It's like the initialization of jQuery needs the
time, but why doesn't close this box???

Anybody knows this problem?

greeting,
matthew


[jQuery] jquery and yii

2009-08-06 Thread kk

hi
how to include jquery in yii php framework


[jQuery] Re: Remove an element but not it's content

2009-08-06 Thread piter

?? Why u wanna use jQuery for this?
It's simple thing in JS:

assuming your rference to link will be:

var theLink;

just do this:

theLink.parentNode.insertBefore(
document.createTextNode
(theLink.innerHTML),
theLink);

theLink.parentNode.removeChild(theLink);

Simple and easy, isn't it?

If you use it often make small function:

function rmTags(ref){
ref.parentNode.insertBefore( document.createTextNode
(ref.innerHTML), ref );
return theLink.parentNode.removeChild(ref);
}

if You use jQuery wrappers, let's say You get your link:

rmTags($("link"));

Hope it was helpful

cheers

Pete

On Aug 6, 3:42 pm, paulswansea  wrote:
> I'm trying to remove a link, but keep the content within, is there a
> simple way to do this in jquery?
>
> ***This is a test
>
> turns into
>
> ***This is a test


[jQuery] Re: Determining if a block is visible

2009-08-06 Thread Joshua Beall

On Aug 5, 7:05 am, "Richard D. Worth"  wrote:
> Your question is better suited to the main jQuery 
> list:http://groups.google.com/group/jquery-en
>
> since it's not about jQuery UI
> plugins[*].

I was thinking that because my use case is most directly tied to the
blind effect (part of jQuery UI, as I understand it), this would be
the best list.  Sorry for the confusion.

> While we're here, you can use the visibility pseudo-selectors, :hidden and
> :visible
>
> http://docs.jquery.com/Selectors/hidden
>
> http://docs.jquery.com/Selectors/visible

Thanks!  But I'm not sure how I'd use these selectors to interrogate
an element by ID--it appears they are used to return elements that are
hidden or visible, respectively.  But I already know an element's ID,
and I want to know if it's hidden or visible... how would I do that
with those selectors?

cc'ing to main jQuery group, and replies should go there.


[jQuery] Re: Determining if a block is visible

2009-08-06 Thread Joshua Beall

On Aug 6, 8:26 am, "Richard D. Worth"  wrote:
> You can include the pseudo-selector in the same selector, immediately after
> the ID, like so:
>
> $("#myDiv:hidden").show();
> $("#myDiv:visible").hide();
>
> Another option would be to use the filter method:
>
> $("#myDiv").filter(":hidden").show();
> $("#myDiv").filter(":visible").hide();
>


That works--I had assumed that if I called something like $
("#myDiv:hidden").show(); when myDiv is visible, it would cause a
problem "object not found" problem since #myDiv:hidden" should return
nothing, and I then tried to call ".show()" on that "nothing" that was
returned.

In Java/C# I would get a NullReferenceException if I tried something
like this.  That's where I do most of my development so that's what I
was expecting.

But I am left asking, why *don't* I get some kind of "object not
found" error?

  -Josh


[jQuery] a selector does not in safari

2009-08-06 Thread hobbyman

I am programming in ASP.NET and using a "hidden" server control which
basically creates a hidden input in the browser.

The only problem with that is that the client ID is or can be dynamic.

So I have this selector that works in Firefox and IE:

$("[id$='_hidCanEdit']").val()

This DOES NOT work in Safari or Chrome.

I'm using jQuery 1.3.2.



[jQuery] Complex licensing questions

2009-08-06 Thread Phil

Hello,

The company I am working for is developing a web application layer for
a commercial software product. My questions have probably been
answered before but I have searched and I can't find a similar
scenario to my question.

The Web UI will be developed using jQuery and involve using the
excellent pre-built plugins other users have developed.

Now under the MIT license can the following be done:

1. Visual Studio has a plugin that uses the YUI compressor to put all
javascript files into one file (compressing and obstruficating the
files).
a. Should we include all the plugins headers in the one big file?(They
would appear with the relevant plugins not just all at the start) (Is
this sufficient even?)
or
b. Should we move them to a separate license file (e.g. license.html)
easily accessible to the user?

2. We have written plugins using jQuery for our own custom
functionality, can we use these with the jQuery library and other
plugins but not have our plugins inherit the MIT license or be
exposed?

3. Some plugins provided by other authors we have modified, how is it
best to handle these? Add a comment to the copyright notice or?

4. Are there any other legal issues we might have implementing MIT
jQuery code/our own commercial code?


A few rather general questions there but I hope someone out there can
help us clear up the legal issues, the company is small and we don't
have access to lawyers or consultants. So I turn to the community and
hope that someone else can help us.

Thanks for any help anyone can provide.

Phil


[jQuery] Re: A script on this page is causing Internet explorer to run slowly

2009-08-06 Thread MorningZ

I'm not sure how you feel someone could help here with absolutely no
information or examples

but common sense says if you clicked "Yes" to the prompt of "Stop
running the script?", then your javascript will, well, stop execution



On Aug 6, 12:26 pm, pankaj  wrote:
> Hi,
>
> I got this message when i try to open the main page of my application
> pankaj.site in IE 6 or IE 7. This is working fine in Firefox, Safari
> etc.
>
> "Stop running the script?
> A script on this page is causing IE to run slowly.
> If it continues to run, your computer may become unresponsive."
>
> After I clicked the "Yes" button, then the loading message came up and
> stopped there.
>
> Any help will be greatly appreciated.
>
> Thanks


[jQuery] Re: Using .live and .each

2009-08-06 Thread Nic Hubbard

Sorry, I slipped up while typing.  I meant I am NOW using ajax as
well.

Using ajax I bring in new content such as:

my iso date

Each time I insert these into the DOM they need to be converted.  The
above script was used to convert them on page load and did not account
for content being added using ajax.

On Aug 5, 5:14 pm, James  wrote:
> It's not clear what you want to do. You said you are "not using ajax"
> but you have content "brought in through ajax". What exactly do you
> need $.live for? For what browser event?
>
> On Aug 5, 1:17 pm, Nic Hubbard  wrote:
>
>
>
> > Anyone?  Someone must have done this...
>
> > On Aug 5, 11:32 am, Nic Hubbard  wrote:
>
> > > I have a script that runs when I load the page which converts some
> > > dates.  I am not using ajax as well, and I need to use .live to
> > > convert the dates that I brought in through ajax.  How would I
> > > combine .live with .each and make it work?
>
> > > if ($("span.ISODate").length > 0) {
> > >         $("span.ISODate").each(function() {
> > >                 $(this).text(getTFID($(this).text()))
> > >         });
>
> > > }


[jQuery] Re: Table sorter

2009-08-06 Thread Mauricio Vargas


For what i know, in the begining of your Jquery call, you might be using:

$(function() {

This begin the call when the file is first loaded...
but if you use:
$(window).load(function(){

The calls will be loaded when your page ends the loading.

Sorry about the bad english.

Mauricio Vargas

--
From: "solow" 
Sent: Thursday, August 06, 2009 1:19 PM
To: "jQuery (English)" 
Subject: [jQuery] Re: Table sorter



so basicaly, i have to call for the page, and after calling for the
page, i call fo the tablesorter function... but how do i know, that
loading the page was finished?

On 6 aug, 15:13, MorningZ  wrote:

"Does anyone know a solution for this problem? "

Yeah, wire up the Tablesorter code to the table *after* it is placed
on the page. because whether the table was there when the page
was generate or dynamically pulled in makes no difference, as long as
it was there in the DOM when ".tablesorter()" was called

On Aug 6, 8:56 am, mila  wrote:



> Here is what I had to do to get tablesorter work for me after changin
> table body:

> var currSort = $("#myTable")[0].config.sortList; //save
> current sorting

> setData(data); //update table with new data

> $("#myTable").trigger("update"); //refresh sorting cache
> $("#myTable").tablesorter();
> $("#myTable").tablesorter(); // had to do that twice for
> column sorting to work in both directions
> $("#myTable").trigger("sorton", [currSort]);

> Hope that helps.

> On Aug 6, 6:23 am, solow  wrote:

> > nobody?
> > i kind of, really need a tablesorter for a dynamically loaded page...

> > On 5 aug, 04:21, solow  wrote:

> > > Hey,

> > > I'm using table sorter.

> > >http://tablesorter.com/

> > > Now, this is great and all, but it doesn't seem to work in 
> > > dynamically

> > > loaded pages.

> > > Does anyone know a solution for this problem?

> > > I hope so..

> > > thanks :)- Tekst uit oorspronkelijk bericht niet weergeven -

- Tekst uit oorspronkelijk bericht weergeven - 




[jQuery] A script on this page is causing Internet explorer to run slowly

2009-08-06 Thread pankaj

Hi,

I got this message when i try to open the main page of my application
pankaj.site in IE 6 or IE 7. This is working fine in Firefox, Safari
etc.

"Stop running the script?
A script on this page is causing IE to run slowly.
If it continues to run, your computer may become unresponsive."

After I clicked the "Yes" button, then the loading message came up and
stopped there.

Any help will be greatly appreciated.

Thanks


[jQuery] Re: Table sorter

2009-08-06 Thread solow

so basicaly, i have to call for the page, and after calling for the
page, i call fo the tablesorter function... but how do i know, that
loading the page was finished?

On 6 aug, 15:13, MorningZ  wrote:
> "Does anyone know a solution for this problem? "
>
> Yeah, wire up the Tablesorter code to the table *after* it is placed
> on the page.  because whether the table was there when the page
> was generate or dynamically pulled in makes no difference, as long as
> it was there in the DOM when ".tablesorter()" was called
>
> On Aug 6, 8:56 am, mila  wrote:
>
>
>
> > Here is what I had to do to get tablesorter work for me after changin
> > table body:
>
> >         var currSort = $("#myTable")[0].config.sortList; //save
> > current sorting
>
> >         setData(data); //update table with new data
>
> >         $("#myTable").trigger("update");  //refresh sorting cache
> >         $("#myTable").tablesorter();
> >         $("#myTable").tablesorter();  // had to do that twice for
> > column sorting to work in both directions
> >         $("#myTable").trigger("sorton", [currSort]);
>
> > Hope that helps.
>
> > On Aug 6, 6:23 am, solow  wrote:
>
> > > nobody?
> > > i kind of, really need a tablesorter for a dynamically loaded page...
>
> > > On 5 aug, 04:21, solow  wrote:
>
> > > > Hey,
>
> > > > I'm using table sorter.
>
> > > >http://tablesorter.com/
>
> > > > Now, this is great and all, but it doesn't seem to work in dynamically
> > > > loaded pages.
>
> > > > Does anyone know a solution for this problem?
>
> > > > I hope so..
>
> > > > thanks :)- Tekst uit oorspronkelijk bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -


[jQuery] Re: Remove an element but not it's content

2009-08-06 Thread paulswansea

Hi,
Tried both those methods. the plugin ended up deleting all siblings,
and replacewith cant replace it with nothing, but made my own quick
and dirty solution should anyone ever want to know the solution :

***This is a test---

//


On Aug 6, 4:04 pm, "Richard D. Worth"  wrote:
> It's not built-in, but there are plugins for 
> it:http://www.google.com/search?q=jquery+unwrap
>
> Or you could use replaceWith:
>
> http://docs.jquery.com/Manipulation/replaceWith
>
> - Richard
>
> On Thu, Aug 6, 2009 at 10:42 AM, paulswansea wrote:
>
>
>
>
>
> > I'm trying to remove a link, but keep the content within, is there a
> > simple way to do this in jquery?
>
> > ***This is a test
>
> > turns into
>
> > ***This is a test- Hide quoted text -
>
> - Show quoted text -


[jQuery] Re: Remove an element but not it's content

2009-08-06 Thread Richard D. Worth
It's not built-in, but there are plugins for it:
http://www.google.com/search?q=jquery+unwrap

Or you could use replaceWith:

http://docs.jquery.com/Manipulation/replaceWith

- Richard

On Thu, Aug 6, 2009 at 10:42 AM, paulswansea wrote:

>
> I'm trying to remove a link, but keep the content within, is there a
> simple way to do this in jquery?
>
> ***This is a test
>
> turns into
>
> ***This is a test


[jQuery] Remove an element but not it's content

2009-08-06 Thread paulswansea

I'm trying to remove a link, but keep the content within, is there a
simple way to do this in jquery?

***This is a test

turns into

***This is a test


[jQuery] Re: JQuery autocomplete got broke after i update it.

2009-08-06 Thread pankaj sharma
Hi All,

Can someone please help me to fix this issue? i am not sure if I am posting
in the right alias?

Thanks,
Pankaj

On Wed, Aug 5, 2009 at 9:02 PM, pankaj  wrote:

> Hi All,
>
> After I update JQuery autocomplete plugin (jQuery UI Autocomplete
> @VERSION), I found one issue. The issue is as follows.
> When I type "jua" in the autocomplete field. Four matches are returned
> for users with the first name juan. Then add an "n".Only the first
> match remains  in the list.
>
> I have come out from this issue by changing the parameter cacheLength:
> 0 in place of 1.
>
>$field.autocomplete({
>  url:ac_url,
>  cacheLength:1,
>
>  For the autocompletion data, it reads from the configuration files.
> Say in the files the data are in this way.
>
> jflores:Juan Flores:jflo...@gmail.com 
> jgomez:Juan Gomez:jgo...@gmail.com 
> jrafaela:Juan Carlos Rafaela:jrafa...@gmail.com
> jromo:Juan Romo:jr...@gmail.com 
> juanw:Juan Wang:ju...@gmail.com 
>
>  It works for previous issue, But creates another problem, If i change
> cacheLength to 0 then if i add some new name in the configuration file
> then it is not taking that updataed
>  data. If i change to 1 then after i type "juan" it displays the last
> one. That is "juanw" and it not displays the other 4name.
>
>
> I could not understand what is missing here. Please help me to resolve
> this issue.
>
> Please let me know if you need more info on this?
>
> Thanks,
>


[jQuery] Re: Attribute selection not working in MSIE; eg $("input[name=name]").val()

2009-08-06 Thread MorningZ

is the input box like



because that is what that selector is after


On Aug 6, 10:18 am, "Cesar Sanz"  wrote:
> Can you show us your code?
> this issue is in IE6, IE7 or IE8?
>
> - Original Message -
> From: "V" 
> To: "jQuery (English)" 
> Sent: Thursday, August 06, 2009 4:21 AM
> Subject: [jQuery] Attribute selection not working in MSIE; eg
>
> $("input[name=name]").val()
>
> > Just when you think you made something beautiful, MSIE screws it all
> > up :(
>
> > I tried to get values from a input box which works great in Firefox,
> > but not in MSIE;
> > $("input[name=name]").val();
>
> > Is there a workaround for MSIE to get this working or am I just doomed
> > to use id's?


[jQuery] Re: jQuery conflicts

2009-08-06 Thread bencharity

Thanks for the reply Charlie!

I'm reading up on the NoConflict but am a little confused (this is all
still quite new to me).

It says  "By using this function, you will only be able to access
jQuery using the 'jQuery' variable. For example, where you used to do $
("div p"), you now must do jQuery("div p")."  Does this mean I call it
after my first jQuery instance and then have to change every $ to
jQuery in my subsequent libraries???



On Aug 5, 12:56 pm, Charlie  wrote:
> you only need to call jQueryNoConflict once for the page
> after that any jQuery functions would start with jQuery('selector'
> Try removing all the noconflict variables
> bencharity wrote:I would like to use several jQuery effects through a website 
> that I am developing; a login popup, a drop down contact form, coda content 
> scroller, and tabbed content. However, these implementations keep interfering 
> with each other. Is there any way to get around this? I seems as though there 
> must be a way to use multiple jQuery functions. The page is 
> here:http://atlanta.scadswap.com/points-of-interest/clubs/opera/Implementing 
> the Login Popup (which doesn't have a login form inside it yet) broke the 
> contact drop down, and it stays revealed now. The tabbed content in the 
> sidebar seems fine though. Something already broke my coda jQuery content 
> scroller here:http://atlanta.scadswap.com/points-of-interest/Thank you in 
> advance for your time!


[jQuery] Re: Attribute selection not working in MSIE; eg $("input[name=name]").val()

2009-08-06 Thread Cesar Sanz


Can you show us your code?
this issue is in IE6, IE7 or IE8?

- Original Message - 
From: "V" 

To: "jQuery (English)" 
Sent: Thursday, August 06, 2009 4:21 AM
Subject: [jQuery] Attribute selection not working in MSIE; eg 
$("input[name=name]").val()





Just when you think you made something beautiful, MSIE screws it all
up :(

I tried to get values from a input box which works great in Firefox,
but not in MSIE;
$("input[name=name]").val();

Is there a workaround for MSIE to get this working or am I just doomed
to use id's? 




[jQuery] Re: Malsup Form Plugin and buttons tags

2009-08-06 Thread NickUK

My buttons are type "submit" and each have values. I believe it could
be because I have a click event on the button and using ajaxSubmit to
submit as I have to dynamically add some values into hidden fields.
How can I submit the button without making another hidden field?

Nick

On Aug 5, 7:40 pm, Mike Alsup  wrote:
> Button elements do not have values submitted when a form submits
> unless they are of type 'submit' and you're using ajaxForm.  More
> details here:
>
> http://www.w3.org/TR/html4/interact/forms.html#successful-controls
>
> Mike
>
> On Aug 4, 10:26 am, NickUK  wrote:
>
> > I'm using 2.28 fromhttp://malsup.com/jquery/form/#download.
>
> > I'm submitting a form using this plugin and that works fine however I
> > use  tags and these do not seem to be submitting with the rest
> > of the fields.
>
> > Has anyone managed to submit a button?
>
> > Nick


[jQuery] Re: xpath not returning objects

2009-08-06 Thread Old Orange Juice

I'm allergic to big red boxes. :-D. Actually I'm color blind. Red just
doesn't register. No wonder I didn't see it.

Thanks for pointing that out.. my bookmarks are updated!

Thanks for the help everyone. I'm glad Jquery has such a wonderful
community.

On Aug 5, 11:09 am, Liam Potter  wrote:
> , in a big red box it says
>
> This is an old version of the *Selectors* API:
> *View the Current API *
>
> Old Orange Juice wrote:
> > IF that's the 
> > case,http://docs.jquery.com/DOM/Traversing/Selectors#Using_CSS_and_XPath_T...
> > should be changed.
>
> > That page says:
>
> > Get the input field's value with the name of 'bar':
>
> >  $("inp...@name=bar]").val();
>
> > All checked radio buttons:
>
> >  $("inp...@type=radio][@checked]")
>
> > it also says:
>
> > e...@foo=bar] an E element whose "foo" attribute value is exactly equal
> > to "bar"
>
> > which is what I did.. Why all of a sudden Jquery doesn't use '@' in
> > xpath expressions?
>
> > Keep the docs up to date? Are there better up to date docs I should be
> > looking at??
>
> > Thanks again for all the help.. very much appreciated :)
>
> > On Aug 4, 8:35 pm, Jules  wrote:
>
> >> jQuery does not recognise @ as attribute indicator.  Just remove the @
> >> from your code and enclose the attribute value with ':
>
> >> $("input:checkbox[name='media_type']").click(function() {
> >>                         if (this.checked == true) {
> >>                                 alert('checkbox true');
> >>                                 $("div[class='mediafield']").hide
> >> ('fast');
>
> >>                 });
>
> >> On Aug 5, 7:55 am, Old Orange Juice  wrote:
>
> >>> I have a bunch of divs with the same classname, 'mediafield':
>
> >>> Slug:
> >>> Big Blurb(Video)
> >>> Big Blub(short content)
> >>> 
> >>> Big Blub(Audio)
> >>> Photo Uri(images):
>
> >>> and I have this jquery code in my header:
> >>> 
> >>> $(document).ready(function() {
> >>>                 $("input:checkb...@name=media_type]").click(function() {
> >>>                         if (this.checked == true) {
> >>>                                 alert('checkbox true');
> >>>                                 $("d...@class=mediafield]").hide('fast');
>
> >>>                 });});
>
> >>> 
>
> >>> So I know that the click function is getting implemented.. The alert
> >>> box appears however I get the following error in firebug:
> >>> uncaught exception: Syntax error, unrecognized expression:
> >>> [...@class=mediafield]
>
> >>> Line 0
>
> >>> Nothing happens when firebug is turned off... So I'm not sure why it's
> >>> throwing the error.
>
> >>> Any help?
>
> >>> Thanks,
> >>> ooj


[jQuery] Re: Remove help

2009-08-06 Thread Dave Maharaj :: WidePixels.com

Sorry...missed my morning coffee :(

Posted the wrong code But I got it with this:

$('a.profile_data').click(function(){
var x_url = $(this).attr('href');
$('#content').append('');
$('#loadHere').fadeOut('fast', function(){
$('#load').fadeIn('normal');
$('#loadHere').load(x_url, function(){
$('#load').fadeOut('normal' , function() { $('#load').remove(); });
$('#loadHere').fadeIn('fast');
_ajaxInit();
});
});
return false;
}); 


Dave
-Original Message-
From: amuhlou [mailto:amysch...@gmail.com] 
Sent: August-06-09 10:56 AM
To: jQuery (English)
Subject: [jQuery] Re: Remove help


where is the click function in your javascript? I don't see it in the
snippet you posted.

it may work better to fade out the loading div as a callback to your load
method:

$('#content').load('//profile/', function(){
   $('#load').fadeOut().remove();
});


On Aug 6, 9:17 am, "Dave Maharaj :: WidePixels.com"
 wrote:
> I have append to add a loading div. But once loaded i want to fade it 
> out and remove it.
>
> I have:
> /* $(document).ready(function(){
>  $('#content').append('
'); >  $('#load').fadeIn('normal'); >  $('#content').load('//profile/'); >  $('#load').fadeOut('normal' , function() { $('#load').remove(); }); > > }); > > > > But it does not remove the #load div...so looking at firebug the load > div gets added everytime a user clicks a link > >id="load"/> > > How can I remove the div once it done loading? > > Dave

[jQuery] Re: Remove help

2009-08-06 Thread amuhlou

where is the click function in your javascript? I don't see it in the
snippet you posted.

it may work better to fade out the loading div as a callback to your
load method:

$('#content').load('//profile/', function(){
   $('#load').fadeOut().remove();
});


On Aug 6, 9:17 am, "Dave Maharaj :: WidePixels.com"
 wrote:
> I have append to add a loading div. But once loaded i want to fade it out
> and remove it.
>
> I have:
> /* $(document).ready(function(){
>  $('#content').append('
'); >  $('#load').fadeIn('normal'); >  $('#content').load('//profile/'); >  $('#load').fadeOut('normal' , function() { $('#load').remove(); }); > > }); > > > > But it does not remove the #load div...so looking at firebug the load div > gets added everytime a user clicks a link > > > > > > > > How can I remove the div once it done loading? > > Dave

[jQuery] Remove help

2009-08-06 Thread Dave Maharaj :: WidePixels.com
I have append to add a loading div. But once loaded i want to fade it out
and remove it.
 
I have:
/*