[jQuery] Fwd: Urgent - Harper killing Copenhagen

2009-12-17 Thread Jonny Miller
-- Forwarded message --
From: Ricken Patel - Avaaz.org 
Date: Wed, Dec 16, 2009 at 11:13 AM
Subject: Urgent - Harper killing Copenhagen
To: "presidentand...@gmail.com" 


 Dear friends,



 *Canada
is blocking crucial UN climate negotiations in Copenhagen* and secretly
rolling back our efforts to fight climate change. A massive national outcry
has stopped Harper before, *the planet needs us now:*

[image: Sign The
Petition!]
*Enough is enough. As the world mounts a desperate effort to stop
catastrophic global warming in Copenhagen, Canada should be leading the way.
Instead, we're receiving global "fossil awards" for wrecking this crucial
summit*! And new leaked documents show that while the entire world is
increasing cuts to carbon emissions, the government is secretly planning
roll back ours.

At the Bali climate summit in 07, a massive national outcry forced Harper to
stop blocking the talks. But the oil companies that PM Harper works for know
that *Copenhagen is the make or break moment* for climate. It will not be
easy to win this time, but to save the planet and our country we have to.

Let's mount a tidal wave of pressure on Harper with *the largest petition in
Canadian history - click below to sign, and forward this email to everyone:*

http://www.avaaz.org/en/harper_enough_is_enough

*The petition will be delivered directly* to the Canadian delegation in
Copenhagen as Harper arrives this week, and names of the signers will
actually be read out in the summit hall. The Canadian delegation has become
the object of international disbelief and ridicule in Copenhagen, but we can
show the world that the Canadian people still hold our values of being good
neighbours and global citizens.

*Harper is undermining our deepest values and proudest traditions.* But this
is about more than our reputation. Studies show that climate change is
already taking up to 300,000 human lives a year through turning millions of
farms to dust and flooding vast areas. *We can no longer allow Harper to
make us responsible for these deaths,* or put Canada's economic future in
jeopardy by sacrificing our green competitiveness for a brown economy based
on the dirtiest (tar sands) oil in the world.

Copenhagen is seeking the biggest mandate in history to stop the greatest
threat humanity has ever faced. History will be made in the next few days,
and our country is the problem, not the solution. *How will our children
remember this moment? Let's tell them we did all we could.*

With hope,

Ricken, Laryn, Anne-Marie, Iain and the Avaaz Canada team

More information at these sites:
CBC -- "Tories pondered weaker emission targets for oil and gas":
http://www.cbc.ca/canada/story/2009/12/14/greenhouse-gas-emissions.html

Mail and Guardian -- "Canada's climate shame":
http://www.mg.co.za/article/2009-12-04-canadas-climate-shame

Toronto Star -- "Who are the Yes Men and why did they punk Canada at
Copenhagen":
http://www.thestar.com/news/world/article/738933--who-are-the-yes-men-and-why-did-they-punk-canada-at-copenhagen

Macleans -- "Suddenly the world hates Canada":
http://www2.macleans.ca/2009/12/15/suddenly-the-world-hates-canada/3/

Fossil of the Day Awards: http://www.fossiloftheday.com/

--


*Want to support Avaaz?* We're entirely funded by donations and receive no
money from governments or corporations. Our dedicated online team ensures
even the smallest contributions go a long way -- donate
here
.


*ABOUT AVAAZ* Avaaz.org is an independent, not-for-profit global campaigning
organization that works to ensure that the views and values of the world's
people inform global decision-making. (Avaaz means "voice" in many
languages.) Avaaz receives no money from governments or corporations, and is
staffed by a global team based in Ottawa, London, Rio de Janeiro, New York,
Buenos Aires, and Geneva. Click
*here*to learn more about our
largest campaigns.
*Don't forget to check out our Facebook  and
Myspace  and
Bebopages! You can also follow Avaaz on
Twitter! *

You are getting this message because you signed "CONGRESS: NO BLANK CHECK
FOR WALL STREET " on 2008-09-25
using the email address presidentand...@gmail.com. To ensure that Avaaz
messages reach your inbox, please add av...@avaaz.org to your address book.
To change your email address, language settings, or other personal
information, click here:
https://secure.avaaz.org/act/index.php?r=profile&user=aeba3c96a4bb6071c0d36fd105a20ec2&lang=enor
simply click
here to 
unsubscribe

[jQuery] Re: Modifying href attribute values

2009-03-15 Thread Jonny Stephens

This seems to work:

$('a').each(function() {
$(this).attr('href','path/to/' + RegExp("[^#]+$").exec($(this).attr
('href')) + '.html');
});

On Mar 15, 7:03 pm, Jonny Stephens  wrote:
> Oops. Wrote too soon.
>
> Works fine for a single anchor. With multiples, all receive the same
> href value as the first.
>
> Needs an .each() somewhere?
>
> On Mar 15, 5:44 pm, Jonny Stephens  wrote:
>
> > Thanks Brad, that's perfect!
>
> > Jonny
>
> > On Mar 15, 5:29 pm, Brad  wrote:
>
> > > There is probably a more concise way to do this, but I'll break down
> > > the steps
>
> > > // regular expression pattern to get the hash value
> > > var patt = new RegExp("[^#]+$");
>
> > > // The href of your attribute. This is a generic example, you will
> > > // probably need to provide a more specific jQuery selector to get the
> > > "a" you
> > > // want to manipulate
> > > var href = $('a').attr('href');
>
> > > // search for hash value in href
> > > var hashval = patt.exec(href);
>
> > > // Again, you'll probably need a more specific jQuery selector
> > > // overwrite the existing href of the selected "a"
> > > $('a').attr('href','path/to/' + hashval + '.html');
>
> > > On Mar 15, 10:22 am, Jonny Stephens  wrote:
>
> > > > Can anyone provide guidance on how to modify href attributes in this
> > > > way:
>
> > > > Markup: 
>
> > > > Modify to: 
>
> > > > i.e. removing everything up to and including the #, prepending a fixed
> > > > path value and appending ".html"
>
> > > > Thanks
>
> > > > Jonny


[jQuery] Re: Modifying href attribute values

2009-03-15 Thread Jonny Stephens

Oops. Wrote too soon.

Works fine for a single anchor. With multiples, all receive the same
href value as the first.

Needs an .each() somewhere?

On Mar 15, 5:44 pm, Jonny Stephens  wrote:
> Thanks Brad, that's perfect!
>
> Jonny
>
> On Mar 15, 5:29 pm, Brad  wrote:
>
> > There is probably a more concise way to do this, but I'll break down
> > the steps
>
> > // regular expression pattern to get the hash value
> > var patt = new RegExp("[^#]+$");
>
> > // The href of your attribute. This is a generic example, you will
> > // probably need to provide a more specific jQuery selector to get the
> > "a" you
> > // want to manipulate
> > var href = $('a').attr('href');
>
> > // search for hash value in href
> > var hashval = patt.exec(href);
>
> > // Again, you'll probably need a more specific jQuery selector
> > // overwrite the existing href of the selected "a"
> > $('a').attr('href','path/to/' + hashval + '.html');
>
> > On Mar 15, 10:22 am, Jonny Stephens  wrote:
>
> > > Can anyone provide guidance on how to modify href attributes in this
> > > way:
>
> > > Markup: 
>
> > > Modify to: 
>
> > > i.e. removing everything up to and including the #, prepending a fixed
> > > path value and appending ".html"
>
> > > Thanks
>
> > > Jonny


[jQuery] Re: Modifying href attribute values

2009-03-15 Thread Jonny Stephens

Thanks Brad, that's perfect!

Jonny

On Mar 15, 5:29 pm, Brad  wrote:
> There is probably a more concise way to do this, but I'll break down
> the steps
>
> // regular expression pattern to get the hash value
> var patt = new RegExp("[^#]+$");
>
> // The href of your attribute. This is a generic example, you will
> // probably need to provide a more specific jQuery selector to get the
> "a" you
> // want to manipulate
> var href = $('a').attr('href');
>
> // search for hash value in href
> var hashval = patt.exec(href);
>
> // Again, you'll probably need a more specific jQuery selector
> // overwrite the existing href of the selected "a"
> $('a').attr('href','path/to/' + hashval + '.html');
>
> On Mar 15, 10:22 am, Jonny Stephens  wrote:
>
> > Can anyone provide guidance on how to modify href attributes in this
> > way:
>
> > Markup: 
>
> > Modify to: 
>
> > i.e. removing everything up to and including the #, prepending a fixed
> > path value and appending ".html"
>
> > Thanks
>
> > Jonny


[jQuery] Modifying href attribute values

2009-03-15 Thread Jonny Stephens

Can anyone provide guidance on how to modify href attributes in this
way:

Markup: 

Modify to: 

i.e. removing everything up to and including the #, prepending a fixed
path value and appending ".html"

Thanks

Jonny


[jQuery] Re: How to use anchor text as title attribute?

2009-03-05 Thread Jonny Stephens

Thanks for pointing out the omission. I'll use this solution as it's
more compact.

Jonny

On Mar 5, 6:49 am, Klaus Hartl  wrote:
> > $('a').attr('title' , function() { $(this).text() } );
>
> > I must be missing something simple here.
>
> Yes, a return statement.
>
> $('a').attr('title' , function() { return $(this).text(); });
>
> --Klaus


[jQuery] Re: How to use anchor text as title attribute?

2009-03-04 Thread Jonny Stephens

Many thanks for your quick response Brian. Works fine.

Images do produce an empty title string as you predicted. I'm solely
targeting text so no problem there.

Jonny

On Mar 4, 11:27 pm, brian  wrote:
> $('a').each(function()
> {
>         $(this).attr('title', $(this).text());
>
> });
>
> Keep in mind, though, that an anchor might have an image inside,
> rather than text. I doubt it'd be an issue. I guess jquery would
> simply set it to the empty string.
>
> On Wed, Mar 4, 2009 at 6:11 PM, Jonny Stephens  wrote:
>
> > I want to generate title attributes from existing anchor text, e.g.
>
> > Foo Foo
>
> > becomes
>
> > Foo Foo
>
> > The code below works in FF3 with Firebug reporting no errors, but
> > Safari reports a parsing error. IE is no go.
>
> > $('a').attr('title' , function() $(this).text());
>
> > adding curly brackets clears the parsing error in Safari but doesn't
> > function in any browser.
>
> > $('a').attr('title' , function() { $(this).text() } );
>
> > I must be missing something simple here.


[jQuery] How to use anchor text as title attribute?

2009-03-04 Thread Jonny Stephens

I want to generate title attributes from existing anchor text, e.g.

Foo Foo

becomes

Foo Foo

The code below works in FF3 with Firebug reporting no errors, but
Safari reports a parsing error. IE is no go.

$('a').attr('title' , function() $(this).text());

adding curly brackets clears the parsing error in Safari but doesn't
function in any browser.

$('a').attr('title' , function() { $(this).text() } );

I must be missing something simple here.


[jQuery] [Cluetip] Anchor text as title

2009-03-04 Thread Jonny Stephens

At present I'm triggering Cluetip thus, with Cluetip using the anchor
title attributes for tip titles:

Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore

Is there a way to skip the title attribute and instead use the anchor
text for the Cluetip title? i.e.

Duis aute irure
dolor in reprehenderit in voluptate velit esse cillum dolore

Thanks

Jonny


[jQuery] Re: autocomplete and json

2009-02-27 Thread Jonny B


It seems there are a few undocumented features now in Autocomplete -
see this demo: http://view.jquery.com/trunk/plugins/autocomplete/demo/json.html

I've got mine (mostly) working now thanks to that (and thanks to
zendog74 for the initial pointers ;)


[jQuery] Re: How to reverse direction of scrollVert fx?

2009-02-22 Thread Jonny Stephens


Ignore the above code. Though it seems to work, I think it should be:

$.fn.cycle.transitions.scrollVertUp = function($cont, $slides, opts) {
$cont.css('overflow','hidden');
opts.before.push(function(curr, next, opts, fwd) {
$.fn.cycle.commonReset(curr,next,opts);
opts.cssBefore.top = fwd ? (next.cycleH-1) : (1-next.cycleH);
opts.animOut.top = fwd ? -curr.cycleH : curr.cycleH;
});
opts.cssFirst = { top: 0 };
opts.cssBefore= { left: 0 };
opts.animIn   = { top: 0 };
opts.animOut  = { left: 0 };
};



> On Feb 22, 3:57 pm, Jonny Stephens  wrote:
>
> > Cycle's scrollHorz and scrollVert fx options allow "back and forth"
> > functionality for the Prev/Next and Pager functions.
>
> > The scrollVert transition scrolls Next content downwards and Prev
> > upwards.
>
> > I'd prefer these to be reversed:
>
> > Next = scrolls up, Prev = scrolls down.
>
> > Thought I'd found an answer in the undocumented "rev" option, but this
> > turns out to reverse the Prev and Next functions i.e. clicking Next
> > moves to the previous slide etc.
>
> > Anyone know how to achieve what I'm after?
>
> > Thanks
>
> > Jonny


[jQuery] Re: How to reverse direction of scrollVert fx?

2009-02-22 Thread Jonny Stephens

Fixed by adding a juggled transition:

$.fn.cycle.transitions.scrollVertUp = function($cont, $slides, opts) {
$cont.css('overflow','hidden');
opts.before.push(function(curr, next, opts, fwd) {
$.fn.cycle.commonReset(curr,next,opts);
opts.cssBefore.top = fwd ? (next.cycleH-1) : (1-next.cycleH-1);
opts.animOut.top = fwd ? -curr.cycleH : curr.cycleH;
});
opts.cssFirst = { top: 0 };
opts.cssBefore= { left: 0 };
opts.animIn   = { top: 0 };
opts.animOut  = { left: 0 };
};



On Feb 22, 3:57 pm, Jonny Stephens  wrote:
> Cycle's scrollHorz and scrollVert fx options allow "back and forth"
> functionality for the Prev/Next and Pager functions.
>
> The scrollVert transition scrolls Next content downwards and Prev
> upwards.
>
> I'd prefer these to be reversed:
>
> Next = scrolls up, Prev = scrolls down.
>
> Thought I'd found an answer in the undocumented "rev" option, but this
> turns out to reverse the Prev and Next functions i.e. clicking Next
> moves to the previous slide etc.
>
> Anyone know how to achieve what I'm after?
>
> Thanks
>
> Jonny


[jQuery] [Cycle] How to reverse direction of scrollVert fx?

2009-02-22 Thread Jonny Stephens

Cycle's scrollHorz and scrollVert fx options allow "back and forth"
functionality for the Prev/Next and Pager functions.

The scrollVert transition scrolls Next content downwards and Prev
upwards.

I'd prefer these to be reversed:

Next = scrolls up, Prev = scrolls down.

Thought I'd found an answer in the undocumented "rev" option, but this
turns out to reverse the Prev and Next functions i.e. clicking Next
moves to the previous slide etc.

Anyone know how to achieve what I'm after?

Thanks

Jonny


[jQuery] Re: Seeking div hide/show plugin with access by URL

2009-01-27 Thread Jonny Stephens

My oversight. Looking at the comments more closely shows Tabs 2
provides options for separation of navigation and content markup
(assigning navClass and containerClass classes respectively).

Thanks again.

Jonny

On Jan 27, 4:58 pm, Jonny Stephens  wrote:
> Thanks for your suggestions Ricardo.
>
> Tabs 2 fails in requiring the trigger links to be located within the
> same div as the content. Otherwise it fits well.
>
> UI Tabs lacks the back button capability of Tabs 2 and doesn't play
> with Safari 2, which (for better or worse) I'm required to support at
> present.
>
> I'll study the Tabs 2 code to see if I can figure out how to allow the
> triggers to reside in a separate div.
>
> Jonny
>
> On Jan 26, 3:07 pm, Ricardo Tomasi  wrote:
>
> > Tryhttp://stilbuero.de/jquery/tabs/
>
> > or the Tabs funcionality in jQuery UI.
>
> > Or venture into the docs/jQuery API 
> > (http://docs.jquery.com,http://api.jquery.com) and you should be able to 
> > accomplish all this
> > by yourself in a few days.
>
> > - ricardo
>
> > On Jan 26, 11:08 am,JonnyStephens  wrote:
>
> > > I'm looking for a jQuery 1.2.6 compatible plugin providing the
> > > following:
>
> > > In a page with a number of sections in divs, on page load a specified
> > > div is visible but all others are hidden.
>
> > > Clicking a link in the sidebar navigation hides the current div and
> > > reveals in that position the div which the link references by id.
>
> > > Reveal/hide animation is not essential but would be preferably be a
> > > fade rather than Coda-type scrolling.
>
> > > It should not be possible for the user to hide all the divs.
>
> > > The link to the currently visible div would be highlighted, by
> > > background colour for example.
>
> > > Importantly, to allow external linking to sections, a specific div
> > > should be displayed when its anchor id is appended to the URL.
>
> > > In order for the content to be accessible and navigable without
> > > javascript I don't wish links or ids to be automatically generated.
>
> > > Is there anything out there that fulfills this?
>
> > > idTabs -http://www.sunsean.com/idTabs/-comesclose, but lacks the
> > > ability to load divs by URL string. A mod to this perhaps?
>
> > > Thanks for reading,
>
> > >Jonny


[jQuery] Re: Seeking div hide/show plugin with access by URL

2009-01-27 Thread Jonny Stephens

Thanks for your suggestions Ricardo.

Tabs 2 fails in requiring the trigger links to be located within the
same div as the content. Otherwise it fits well.

UI Tabs lacks the back button capability of Tabs 2 and doesn't play
with Safari 2, which (for better or worse) I'm required to support at
present.

I'll study the Tabs 2 code to see if I can figure out how to allow the
triggers to reside in a separate div.

Jonny



On Jan 26, 3:07 pm, Ricardo Tomasi  wrote:
> Tryhttp://stilbuero.de/jquery/tabs/
>
> or the Tabs funcionality in jQuery UI.
>
> Or venture into the docs/jQuery API 
> (http://docs.jquery.com,http://api.jquery.com) and you should be able to 
> accomplish all this
> by yourself in a few days.
>
> - ricardo
>
> On Jan 26, 11:08 am,JonnyStephens  wrote:
>
> > I'm looking for a jQuery 1.2.6 compatible plugin providing the
> > following:
>
> > In a page with a number of sections in divs, on page load a specified
> > div is visible but all others are hidden.
>
> > Clicking a link in the sidebar navigation hides the current div and
> > reveals in that position the div which the link references by id.
>
> > Reveal/hide animation is not essential but would be preferably be a
> > fade rather than Coda-type scrolling.
>
> > It should not be possible for the user to hide all the divs.
>
> > The link to the currently visible div would be highlighted, by
> > background colour for example.
>
> > Importantly, to allow external linking to sections, a specific div
> > should be displayed when its anchor id is appended to the URL.
>
> > In order for the content to be accessible and navigable without
> > javascript I don't wish links or ids to be automatically generated.
>
> > Is there anything out there that fulfills this?
>
> > idTabs -http://www.sunsean.com/idTabs/-comes close, but lacks the
> > ability to load divs by URL string. A mod to this perhaps?
>
> > Thanks for reading,
>
> >Jonny


[jQuery] Seeking div hide/show plugin with access by URL

2009-01-26 Thread Jonny Stephens

I'm looking for a jQuery 1.2.6 compatible plugin providing the
following:

In a page with a number of sections in divs, on page load a specified
div is visible but all others are hidden.

Clicking a link in the sidebar navigation hides the current div and
reveals in that position the div which the link references by id.

Reveal/hide animation is not essential but would be preferably be a
fade rather than Coda-type scrolling.

It should not be possible for the user to hide all the divs.

The link to the currently visible div would be highlighted, by
background colour for example.

Importantly, to allow external linking to sections, a specific div
should be displayed when its anchor id is appended to the URL.

In order for the content to be accessible and navigable without
javascript I don't wish links or ids to be automatically generated.

Is there anything out there that fulfills this?

idTabs - http://www.sunsean.com/idTabs/ - comes close, but lacks the
ability to load divs by URL string. A mod to this perhaps?

Thanks for reading,

Jonny


[jQuery] Re: $.get ajax method callback being called before the script return...

2008-08-29 Thread Jonny

Hey thanks, didn't know that tool, awesome =)

i was just using fiddler and there's  something bizarre happening
around here...

When i change the select box , sometimes the ajax execute sucefully,
showing response 200 on fiddler.
But most times its just don't respond... i click the select box and
fiddler shows nothing.

Well, it could just be a javascript mistyping, but The weird part is
that: if i place an alert after "function(data){ " ,
the alert is shown Everytime i click the select box.


I'll try to figure out whats happening, i think its related to the
paramenter i'm passing to get...



On 29 ago, 13:03, MorningZ <[EMAIL PROTECTED]> wrote:
> If i had to take a guess, i'd say there was an error getting raised
> from the AJAX call for whatever reason
>
> i'd suggest downloading "Fiddler" (http://www.fiddlertool.com) and
> watching the network traffic to see if the call raises an error


[jQuery] Re: $.get ajax method callback being called before the script return...

2008-08-29 Thread Jonny

I didn't knew fiddler, nice tool =)

im testing the script with fiddler now, and something very strange is
happening...

When i change the select box designated with the function, the first
times it's ok, and a 200 OK line pops on fiddler.
But after de 3th or 4th change it stop showing messages on Fiddler.

But the weird part is that I've put a alert after "function(data){" ,
and everytime i call it the message appears...



On 29 ago, 13:03, MorningZ <[EMAIL PROTECTED]> wrote:
> If i had to take a guess, i'd say there was an error getting raised
> from the AJAX call for whatever reason
>
> i'd suggest downloading "Fiddler" (http://www.fiddlertool.com) and
> watching the network traffic to see if the call raises an error


[jQuery] $.get ajax method callback being called before the script return...

2008-08-29 Thread Jonny

I'm far from a specialist , but i think its a piece of cake so , here
we go...

I have the following function being called whenever a combobox is
changed:

function ajax_do(pAcao, pId , pIdt){
  if (typeof pId == 'undefined' ) pId = '0';
  if (typeof pIdt == 'undefined' ) pIdt = '0';
  $('#messagemLoading').show();
  $.get("carrinho.php", { acao: pAcao, id: pId , idt : pIdt },
  function(data){
$('#messagemLoading').hide();
return data;
  });
}

it's working , but i need tomake sure the request is finished before
allowing the user to continue, the #messagemLoading  should do the
job, in Firefox it's working fine and the #messagemLoading only hides
when the request ends, but in internet explorer the #messagemLoading
pops and close before the request is finished =/




[jQuery] Re: Help

2008-04-08 Thread Jonny Polite

Clearly.

On Apr 8, 8:32 am, "Jake McGraw" <[EMAIL PROTECTED]> wrote:
> Spam?
>
> On Tue, Apr 8, 2008 at 4:46 AM, Sarah Johns <[EMAIL PROTECTED]> wrote:
>
> >  Hello guys, i need some serious help here. My dad made a site, this
> >  http://www.videoriporter.hu. And he cant make it work. Can any of you
> >  help me? Thank you Sarah


[jQuery] Re: Nested Ajax callbacks not working in IE7

2008-04-08 Thread Jonny Polite

Not sure why that wouldn't work, but have you tried putting your
second AJAX call into a separate function that the first AJAX success
calls?  That's generally how I structure my code and I haven't had any
browser issues so far.

On Apr 8, 2:38 am, Dannster <[EMAIL PROTECTED]> wrote:
> Hi Guys
>
> Has anyone had any problems with nested callbacks in IE7?
>
> I have an ajax callback which contacts a web service and fires another
> ajax callback on success.
>
> Both callbacks get fired on Firefox but only the first one gets fired
> om IE7.
>
> here is my code...
>
> $.ajax({
> type: "POST",
> url: "/WebServices/KayakService.asmx/GetSession",
> beforeSend: function(xhr) {
> xhr.setRequestHeader("Content-type", "application/json;
> charset=utf-8");
> },
> dataType: "json",
> success: function(msg) {
> sessionId = msg;
> alert(sessionId);
> $.ajax({
> type: "POST",
> data: '{"origin":"' + originCode + '","destination":"' +
> destinationCode + '","depDate":"' + $("#depDate").val() +
> '","retDate":"' + $("#retDate").val() + '","sessionId":"'+ sessionId
> +'"}',
> url: "/WebServices/KayakService.asmx/GetFlightSearchId",
> beforeSend: function(xhr) {
> xhr.setRequestHeader("Content-type","application/json;
> charset=utf-8");
> },
> dataType: "json",
> success: function(e) {
> searchId = e;
> alert(searchId);
> getResults();
> }
>  });
> }
>
> });
>
> Any help appreciated, bit of a showstopper this one.
>
> Dannster


[jQuery] Re: problem with tablesorter and dynamic table content

2008-04-08 Thread Jonny Polite

Building the entire table in the javascript is more annoying, but it
definitely worked.  Thanks.

On Apr 5, 11:04 pm, Matt Grimm <[EMAIL PROTECTED]> wrote:
> I also ran across this issue with dynamically loaded tbody content. I
> came to the conclusion, after poring over the tablesorter source code,
> that the only solution is to rebuild the entire table with each
> dynamic reload. The idea was originally posted here:
>
> http://groups.google.com/group/jquery-en/browse_thread/thread/32732ee...
>
> On Apr 3, 1:05 pm, Jonny Polite <[EMAIL PROTECTED]> wrote:
>
> > Hello,
>
> > So I have this table where the  is initially blank.  Then when
> > the document is ready I call a function that runs an AJAX query for
> > the table content.
>
> > The initial content is sorted awesomely!  But when I call my function
> > again with different parameters to get new content, things start to go
> > wrong.  The table fills with the new content just fine, but clicking
> > on a header column to sort reverts the table content back to what it
> > was when the page first loaded.
>
> > As you can see below, I have some logic in there to call
> > the .trigger("update") any time the content is updated.  It just
> > doesn't seem to be doing the trick.  It's liketablesorternever
> > figures out that there is new content it should be sorting with.
>
> > Has anyone ever encountered this?  Is there a solution or have I
> > simply encountered a bug?  I really hope someone has something I could
> > try.  Below it the relevant code for your perusal.
>
> > 
> > The initial table looks like this:
> > 
> > 314 
> > 315 
> > 316 
> > 317 category
> > 318 name
> > 319 description
> > 320 active
> > 321 viewable
> > 322 end user viewable
> > 323 OST bucket
> > 324 
> > 325 
> > 326 
> > 327 
> > 328  > value="save changes" />
> > 329 
> > 330 
> > 331 
> > 332 
> > 333 
>
> > 
> > The bulk of the function work happens within the success section of
> > the AJAX call.  The success part looks like this:
> > 
> > 143 success:function(data) {
> > 144 var issue_data = eval( "("+data+")" );
> > 145
> > 146 var issue_table = $j("#issue_table");
> > 147
> > 148 // Clear out whatever's in the table body
> > 149 var tbody = $j("#issue_table tbody");
> > 150 tbody.empty();
> > 151
> > 152 $j.each( issue_data, function() {
> > 153 var issue_string =  " > color:#EFF8FF\">";
> >  code that constructs an entire TR as a string
> > 167
> > 168 tbody.append( issue_string );
> > 169 });
> > 170
> > 171 // Sort the table
> > 172 if( update ) {
> > 173 issue_table.trigger("update");
> > 174 var sorting = [[0,0]];
> > 175 issue_table.trigger("sorton", [sorting]);
> > 176 } else {
> > 177 issue_table.tableSorter({
> > 178 debug:  true,
> > 179 sortColumn: 'name',
> > 180 sortClassAsc:   'issue_header_asc',
> > 181 sortClassDesc:  'issue_header_desc',
> > 182 headerClass:'issue_header'
> > 183 });
> > 184 }
> > 185
> > 186 }


[jQuery] Re: Selecting part of table structure

2008-04-04 Thread Jonny Polite

I'm not entirely sure what you're trying to accomplish, but selecting
that first  is easy since it has its own id, just use $
("#first").clone()

On Apr 2, 8:32 pm, Pete Kruckenberg <[EMAIL PROTECTED]>
wrote:
> Assuming I have
>
> 
>   
> 
>   1
> 
> 
>   2
> 
>   
> 
>
> is there a way with jQuery to select (and then clone) the following
> (i.e. the table structure, but with just the first 
>
> 
>   
> 
>   1
> 
>   
> 
>
> Thanks for your help.
> Pete.


[jQuery] Re: Tablesorter 2.0 : Problem with Sort Direction

2008-04-04 Thread Jonny Polite

Pretty sure that's just how it works.  Clicking on a column always
makes it run the opposite of the last sort that was used.

On Apr 2, 9:30 am, cl4ncy <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm finding this plugin very useful, however i have one major problem
> with it (i dont know if its just me).
>
> When i click to sort on a column it sorts it ascending, which is
> correct. Then i sort on another column ascendng, fine. If i click to
> sort the first column again it sorts it descending, even though i
> moved columns. I would expect all columns to sort ascending unless i
> was already sorting on that column.
>
> Is this a bug in the plugin and is there a way around this?
>
> Thanks


[jQuery] problem with tablesorter and dynamic table content

2008-04-03 Thread Jonny Polite

Hello,

So I have this table where the  is initially blank.  Then when
the document is ready I call a function that runs an AJAX query for
the table content.

The initial content is sorted awesomely!  But when I call my function
again with different parameters to get new content, things start to go
wrong.  The table fills with the new content just fine, but clicking
on a header column to sort reverts the table content back to what it
was when the page first loaded.

As you can see below, I have some logic in there to call
the .trigger("update") any time the content is updated.  It just
doesn't seem to be doing the trick.  It's like tablesorter never
figures out that there is new content it should be sorting with.

Has anyone ever encountered this?  Is there a solution or have I
simply encountered a bug?  I really hope someone has something I could
try.  Below it the relevant code for your perusal.



The initial table looks like this:

314 
315 
316 
317 category
318 name
319 description
320 active
321 viewable
322 end user viewable
323 OST bucket
324 
325 
326 
327 
328 
329 
330 
331 
332 
333 


The bulk of the function work happens within the success section of
the AJAX call.  The success part looks like this:

143 success:function(data) {
144 var issue_data = eval( "("+data+")" );
145
146 var issue_table = $j("#issue_table");
147
148 // Clear out whatever's in the table body
149 var tbody = $j("#issue_table tbody");
150 tbody.empty();
151
152 $j.each( issue_data, function() {
153 var issue_string =  "";
 code that constructs an entire TR as a string
167
168 tbody.append( issue_string );
169 });
170
171 // Sort the table
172 if( update ) {
173 issue_table.trigger("update");
174 var sorting = [[0,0]];
175 issue_table.trigger("sorton", [sorting]);
176 } else {
177 issue_table.tableSorter({
178 debug:  true,
179 sortColumn: 'name',
180 sortClassAsc:   'issue_header_asc',
181 sortClassDesc:  'issue_header_desc',
182 headerClass:'issue_header'
183 });
184 }
185
186 }


[jQuery] Re: Execute JavaScript that is added to the page by AJAX?

2008-03-05 Thread Jonny

Oh I totally agree with you all, personally I have no problem with the
weight of Jquery, but the person I'm doing this for does for some
reason I don't fully understand.  I'm going to send them a link to
this discussion and hopefully the answers provided will work for them,
and if not they can jump in to the frey :)

On Mar 5, 11:56 am, chrismarx <[EMAIL PROTECTED]> wrote:
> if you load the minified or packed version of jquery, and have gzip
> compression on your server (which everyone should have anyways),
> jquery is only around 15kb! is that heavy?
>
> On Mar 5, 10:51 am, Jonny <[EMAIL PROTECTED]> wrote:
>
> > Ok, sorry, never mind, I guess there was just a delay in this post
> > going live, sorry for my impatience :/
>
> > Just to clarify, this is not really a Jquery question, but this group
> > seems to be the most active one that has AJAX experts in it, so that's
> > why I posted it here.  I know that the people who are asking this
> > question (through me) are not wanting to load a heavy js library
> > (Jquery), so the advice below won't really work :(
>
> > - J
>
> > On Mar 4, 2:54 pm, "Jonny M" <[EMAIL PROTECTED]> wrote:
>
> > > I posted this almost an hour ago and it is still not showing up in the
> > > Google Group... why?
>
> > > - Jonny
>
> > > On Tue, Mar 4, 2008 at 2:01 PM, Jonny <[EMAIL PROTECTED]> wrote:
> > > > Basically, I have a JavaScript function (let's call the function
> > > > "displayDiv") that ends up writing a  to the page.  If
> > > > "displayDiv" is called within a table cell, the  will be added
> > > > and displayed in that table cell.  Now, what I'm trying to accomplish
> > > > is replicating this behaviour with an AJAX function (let's call the
> > > > function "callAJAX") that returns HTML containing "displayDiv" and
> > > > adding the code to a specific location in the page.  I have tried
> > > > this, problem is that the JavaScript returned from "callAJAX" was not
> > > > executed.
>
> > > > I then did some research and tried a few things:
>
> > > >   1. I tried parsing out the JavaScript (displayDiv) from the
> > > > returned HTML (callAJAX) and adding it to the  tag, which in
> > > > theory, should be executed.  This approach did not work for me because
> > > > "displayDiv" writes a  to the page and from the  it would
> > > > not know where to write the .
>
> > > >   2. I have tried parsing out the JavaScript (displayDiv) from the
> > > > returned HTML (callAJAX) and executing it with EVAL() but this would
> > > > not work because the AJAX function would not know where to write the
> > > >  created within the "displayDiv" function.
>
> > > > I guess what I'm hoping for is some magical piece of code that would
> > > > tell the browser to parse the page again and execute the JavaScript
> > > > that was added to the page by the AJAX function.
>
> > > > 
>
> > > > I am posting this on behalf of a friend who is to busy today :)  If
> > > > anyone can tell me if this is even possible, and if so, where to go
> > > > next, that would be most excellent!
>
> > > > Many thanks,
>
> > > > - Jonny


[jQuery] Re: Execute JavaScript that is added to the page by AJAX?

2008-03-05 Thread Jonny

Ok, sorry, never mind, I guess there was just a delay in this post
going live, sorry for my impatience :/

Just to clarify, this is not really a Jquery question, but this group
seems to be the most active one that has AJAX experts in it, so that's
why I posted it here.  I know that the people who are asking this
question (through me) are not wanting to load a heavy js library
(Jquery), so the advice below won't really work :(

- J


On Mar 4, 2:54 pm, "Jonny M" <[EMAIL PROTECTED]> wrote:
> I posted this almost an hour ago and it is still not showing up in the
> Google Group... why?
>
> - Jonny
>
> On Tue, Mar 4, 2008 at 2:01 PM, Jonny <[EMAIL PROTECTED]> wrote:
> > Basically, I have a JavaScript function (let's call the function
> > "displayDiv") that ends up writing a  to the page.  If
> > "displayDiv" is called within a table cell, the  will be added
> > and displayed in that table cell.  Now, what I'm trying to accomplish
> > is replicating this behaviour with an AJAX function (let's call the
> > function "callAJAX") that returns HTML containing "displayDiv" and
> > adding the code to a specific location in the page.  I have tried
> > this, problem is that the JavaScript returned from "callAJAX" was not
> > executed.
>
> > I then did some research and tried a few things:
>
> >   1. I tried parsing out the JavaScript (displayDiv) from the
> > returned HTML (callAJAX) and adding it to the  tag, which in
> > theory, should be executed.  This approach did not work for me because
> > "displayDiv" writes a  to the page and from the  it would
> > not know where to write the .
>
> >   2. I have tried parsing out the JavaScript (displayDiv) from the
> > returned HTML (callAJAX) and executing it with EVAL() but this would
> > not work because the AJAX function would not know where to write the
> >  created within the "displayDiv" function.
>
> > I guess what I'm hoping for is some magical piece of code that would
> > tell the browser to parse the page again and execute the JavaScript
> > that was added to the page by the AJAX function.
>
> > 
>
> > I am posting this on behalf of a friend who is to busy today :)  If
> > anyone can tell me if this is even possible, and if so, where to go
> > next, that would be most excellent!
>
> > Many thanks,
>
> > - Jonny


[jQuery] Re: Execute JavaScript that is added to the page by AJAX?

2008-03-05 Thread Jonny M
I posted this almost an hour ago and it is still not showing up in the
Google Group... why?

- Jonny

On Tue, Mar 4, 2008 at 2:01 PM, Jonny <[EMAIL PROTECTED]> wrote:

> Basically, I have a JavaScript function (let's call the function
> "displayDiv") that ends up writing a  to the page.  If
> "displayDiv" is called within a table cell, the  will be added
> and displayed in that table cell.  Now, what I'm trying to accomplish
> is replicating this behaviour with an AJAX function (let's call the
> function "callAJAX") that returns HTML containing "displayDiv" and
> adding the code to a specific location in the page.  I have tried
> this, problem is that the JavaScript returned from "callAJAX" was not
> executed.
>
> I then did some research and tried a few things:
>
>
>   1. I tried parsing out the JavaScript (displayDiv) from the
> returned HTML (callAJAX) and adding it to the  tag, which in
> theory, should be executed.  This approach did not work for me because
> "displayDiv" writes a  to the page and from the  it would
> not know where to write the .
>
>
>
>   2. I have tried parsing out the JavaScript (displayDiv) from the
> returned HTML (callAJAX) and executing it with EVAL() but this would
> not work because the AJAX function would not know where to write the
>  created within the "displayDiv" function.
>
> I guess what I'm hoping for is some magical piece of code that would
> tell the browser to parse the page again and execute the JavaScript
> that was added to the page by the AJAX function.
>
> 
>
> I am posting this on behalf of a friend who is to busy today :)  If
> anyone can tell me if this is even possible, and if so, where to go
> next, that would be most excellent!
>
> Many thanks,
>
> - Jonny
>


[jQuery] Execute JavaScript that is added to the page by AJAX?

2008-03-04 Thread Jonny

Basically, I have a JavaScript function (let's call the function
"displayDiv") that ends up writing a  to the page.  If
"displayDiv" is called within a table cell, the  will be added
and displayed in that table cell.  Now, what I'm trying to accomplish
is replicating this behaviour with an AJAX function (let's call the
function "callAJAX") that returns HTML containing "displayDiv" and
adding the code to a specific location in the page.  I have tried
this, problem is that the JavaScript returned from "callAJAX" was not
executed.

I then did some research and tried a few things:


   1. I tried parsing out the JavaScript (displayDiv) from the
returned HTML (callAJAX) and adding it to the  tag, which in
theory, should be executed.  This approach did not work for me because
"displayDiv" writes a  to the page and from the  it would
not know where to write the .



   2. I have tried parsing out the JavaScript (displayDiv) from the
returned HTML (callAJAX) and executing it with EVAL() but this would
not work because the AJAX function would not know where to write the
 created within the "displayDiv" function.

I guess what I'm hoping for is some magical piece of code that would
tell the browser to parse the page again and execute the JavaScript
that was added to the page by the AJAX function.



I am posting this on behalf of a friend who is to busy today :)  If
anyone can tell me if this is even possible, and if so, where to go
next, that would be most excellent!

Many thanks,

- Jonny


[jQuery] Re: Persistent menu using cookies based rather than location based

2008-01-07 Thread Jonny

I am having a similar issues and as of yet nobody has been able to
give me a solution :(  It seems like it should be a pretty straight
forward problem, and lot's of people are asking for help with it, so
where are the experts (that know how to communicate to us non-
experts)???

Still wondering,

- Jonny

On Jan 5, 7:12 am, Mali <[EMAIL PROTECTED]> wrote:
> Hi, I am fairly new to jquery but I have been practicing for a month.
> I would like to create a jquery persistentmenu. I've been searching
> for a perfect solution but could not find one.
>
> I have start with a 
> basicmenuhttp://www.ecommercewebtemplates.net/test/test.html
>
> Themenuis expanded / collapsed when you click on  tag.
> However, it's collapsed again when you click any link to another page.
> This is not what I want.
>
> So I created another one using location based 
> :http://www.ecommercewebtemplates.net/test/jquery-menu-location-based
>
> It's very basic if you click to view the source code .
>
> OK the location basedmenuworks but still not perfect for users
> because  tag is expanded only if user click on the link that
> belong to it.
>
> I want to have a persistentmenuthat remember the last states
> (expanded or collapsed).
> If user click to expand both 'Span A' and 'Span B' without collapsing
> them then it should stay open when the next page is loaded.
>
> I have had a look at the example 
> fromhttp://www.dynamicdrive.com/dynamicindex1/slashdot.htm
> but their cookies is too complex to understand.
>
> How do I make a persistent jQuerymenuthat remember the last action?
> is the cookies based the best solution?
>
> Your suggestion/help would be very appreciated.
>
> Mali


[jQuery] Re: Menus states and cookies - simple DOM question, please help!

2007-12-21 Thread Jonny

Hmmm, looks interesting, if not a bit complex :)  I'll take a closer
look after holidays :-)

- J



On Dec 21, 1:48 pm, "Glen Lipka" <[EMAIL PROTECTED]> wrote:
> This might be a case for the history plugin.
> Checkout how the tabs plugin uses the history plugin to maintain which tab
> is open.
> It should fundamentally be the same technique.
>
> http://stilbuero.de/jquery/history/
>
> Glen
>
> On Dec 21, 2007 12:01 PM, Jonny <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hello,
>
> > I think this should be a pretty simple issue but I can't find any
> > clear information on how to do it :(
>
> > In-a-nutshell, I just need an accordion menu to not lose it's state
> > (what is open/closed at the time of click) when the new page loads.
>
> > I've poured over the following pages already:
>
> >http://www.learningjquery.com/2007/03/accordion-madness
> >http://bassistance.de/jquery-plugins/jquery-plugin-accordion/
> >http://jeroencoumans.nl/journal/simple-accessible-jquery-menu
>
> > And while they all work as is, I'm not able to modify them for my
> > needs, so I'm obviously not at that skill level, which of course is
> > why I'm writing post now :)
>
> > So far I've learned that "this" will return the current value of the
> > href within the link, and if turned into a variable first will return
> > the element (a in this case)...
>
> > How do I save the dom path of "this" into a cookie so that I
> > can .show() the exact same element when the new page loads?
>
> > I hope someone can help before I tear all my hair out ;)
>
> > - Jonny


[jQuery] Menus states and cookies - simple DOM question, please help!

2007-12-21 Thread Jonny

Hello,

I think this should be a pretty simple issue but I can't find any
clear information on how to do it :(

In-a-nutshell, I just need an accordion menu to not lose it's state
(what is open/closed at the time of click) when the new page loads.

I've poured over the following pages already:

http://www.learningjquery.com/2007/03/accordion-madness
http://bassistance.de/jquery-plugins/jquery-plugin-accordion/
http://jeroencoumans.nl/journal/simple-accessible-jquery-menu

And while they all work as is, I'm not able to modify them for my
needs, so I'm obviously not at that skill level, which of course is
why I'm writing post now :)

So far I've learned that "this" will return the current value of the
href within the link, and if turned into a variable first will return
the element (a in this case)...

How do I save the dom path of "this" into a cookie so that I
can .show() the exact same element when the new page loads?

I hope someone can help before I tear all my hair out ;)

- Jonny