[jQuery] Re: Can I select and/or ?

2009-08-12 Thread rolfsf

Thanks for the reply Richard!
This is a quick prototype, so for the moment I'm using the
ColumnManager plugin - 
http://p.sohei.org/stuff/jquery/columnmanager/demo/demo.html
It seems to simplify the process a bit, though it's not exactly what
I'm looking for
-rolfsf



On Aug 12, 6:21 pm, "Richard D. Worth"  wrote:
> Unfortunately you have to get the columns by selecting the n-th cell in each
> row. If you're going to be doing lots of toggling, would be best to add a
> class to each, like col1, col2, col3; either in the generated html, or on
> document.ready, so you're not searching over and over, especially if it's a
> large table. Or at the very least, cache the jQuery objects that contain
> each column of cells, the results of your queries, if the table isn't going
> to change.
> - Richard
>
> On Wed, Aug 12, 2009 at 3:17 PM, rolfsf  wrote:
>
> > I've got a table in which I've set up some column groups.
> > 
> >    
> > 
> > 
> >    
> >    
> >    
> >    
> > 
> > 
> >    
> >    
> >    
> >    
> > 
> > ...
>
> > Ideally, I'd like to be able to toggle the visibility of the  > class="that"> - can I select them as cols in jquery, or do I need to
> > get at them via the rows?
>
> > Thanks!


[jQuery] Can I select and/or ?

2009-08-12 Thread rolfsf

I've got a table in which I've set up some column groups.















...

Ideally, I'd like to be able to toggle the visibility of the  - can I select them as cols in jquery, or do I need to
get at them via the rows?

Thanks!


[jQuery] Re: Homemade, finder-like menu - problems with (un)hiding columns on click

2009-04-11 Thread rolfsf

I don't have an answer to your specific plugin problems, but have you
seen Nicolas Rudas' jQuery Finder plugin? : 
http://www.nicolas.rudas.info/jquery/finder/

Perhaps an answer lies in that plugin, which has similar goals to your
own



On Apr 10, 3:46 pm, Maurice Kroon  wrote:
> Hi,
>
> First of all, I wanted to thank you guys since you always help me out
> here.
>
> Second, about my problem.. I'm trying to write some jquery code here,
> but I've been stuck with it for days.
> What i want to do is a sort of finder-like (on mac) menu. Goal is to
> select a category. But, categories can be very deep, so i want to add
> some animation.
>
> Now, so far, I've got:
> one big ul that is transformed into nice lists
> when an item is clicked, it opens up subcategories (if there are)
> and some layout changes
>
> but, however. As you can see if you test it out, there is some serious
> strange behavior going on..
>
> If you follow the path: 'follow' you'll see what i mean, as soon as
> you click somewhere else.
> The goal is that there are always a maximum of 4 columns visible. If
> there are 5 one hides. If there are 3, the fourth one shows (if there
> is any). Etc.. Now, i thought this seems pretty logical and easy, but
> I'm really, really stuck with it.
>
> Currently the page is at:http://bucee.xapss.com/category.html
>
> Thanks a lot!
>
> Could you help me out? Really, really thanks in advance! Maybe i could
> turn it into a plugin after, if this works it seems kinda neat i
> think.
>
> Thanks in advance!


[jQuery] Re: proper syntax for a local path ../myDirectory/myFile.htm

2009-03-18 Thread rolfsf

Thanks Nikola. Unfortunately, this prototype will be opened on various
people's computers, so I can't anticipate what the directory setup
will be on their machine (both mac and pc), hence my use of a path
relative to my document  ../myDirectory/



On Mar 18, 2:02 pm, Nikola  wrote:
> I do this all the time...
>
> file:///c:/myDirectory/myFile.htm #myDiv
>
> On Mar 18, 3:32 pm, rolfsf  wrote:
>
> > I need to make a simple 'freestanding' prototype to be run locally. I
> > used a simple load() to grab a div from another file:
>
> > $('#ajax-panel').load("../myDirectory/myFile.htm #myDiv");
>
> > but the ../ in the url chokes. How can I accomplish that for a
> > prototype that runs locally on my machine without a proper server?
>
> > Thanks


[jQuery] proper syntax for a local path ../myDirectory/myFile.htm

2009-03-18 Thread rolfsf

I need to make a simple 'freestanding' prototype to be run locally. I
used a simple load() to grab a div from another file:

$('#ajax-panel').load("../myDirectory/myFile.htm #myDiv");

but the ../ in the url chokes. How can I accomplish that for a
prototype that runs locally on my machine without a proper server?

Thanks


[jQuery] Re: How to debug when upgrading Jquery...

2009-02-19 Thread rolfsf

I'm just starting the same process, and so far the most common error
I've been hitting has been the discontinued attribute selector syntax
[...@name=foo], which is an easy one to fix- just get rid of the @. Most
of those errors were in my own scripts, not the plugins. In a couple
cases that error was in a plugin, but an updated version fixed it.
(jquery.checkboxes.js, jquery.selectboxes.js)

I have not encountered problems with superfish, and have not yet
noticed a problem with blockUI, but I'm not using the form plugin.

I have two more complicated screens that use quite a few plugins, and
they currently don't work with 1.3.1. When I have time, I'm going to:
1) load the production versions of all plugins rather than the .min
versions
2) methodically delete plugins and my calls to them to figure out
which one(s) is(are) the culprit (if firebug or other js debuggers
don't clue me in sooner)

but I'll be watching this space for more advice :-)

On Feb 19, 11:57 am, webdev_help  wrote:
> I have a number of plugins that aren't working when I upgraded the
> site from 1.2.3 to 1.3+. I am assuming this is based partially on the
> plugin although updated them to the latest as well...How can I begin
> to troubleshoot these changes? I am thinking it could be something
> with the selectors - core - I dont even know how to troubleshoot it
> doesn't throw errors - just doesn't seem to be binding to the
> elements.
>
> I know this is vague -  I am just looking for somewhere to begin. I
> want to update the site to the latest version just dont have time to
> rework all the code.
>
> thanks in advance.
>
> John


[jQuery] Re: the new whitehouse.gov - jQuery powered

2009-01-20 Thread rolfsf

It looks like it's built with .NET, which would explain the MS Ajax

On Jan 20, 2:20 pm, MorningZ  wrote:
> Checking out some of the code/technology used on the new site, i also
> see they have MS Ajax on there (see in the "net" panel of Firebug:  /
> WebReource.axd)
>
> On Jan 20, 4:30 pm, Rey Bango  wrote:
>
> > Bruce & Andy,
>
> > The jQuery mailing list isn't a forum for political discussion. Please
> > focus on jQuery-related topics.
>
> > Thanks,
>
> > Rey
> > jQuery Team


[jQuery] jQuery noConflict() help

2009-01-20 Thread rolfsf

Trying to use jQuery & some plugins alongside Prototype/Scriptalicious
in Tapestry

I added noConflict to my scripts using this method:

jQuery.noConflict();

(function($) {
$(function() {

//my stuff here

});
})(jQuery);

But I'm not clear as to whether or not I need to go through each
plugin script adding noConflict() as well. Or if I've just chosen the
wrong technique...

Can anyone clarify?

Thanks




[jQuery] Re: the new whitehouse.gov - jQuery powered

2009-01-20 Thread rolfsf


$('#POTUS43').hide(fast);


On Jan 20, 11:36 am, brian  wrote:
> $(nation).ready(function()
> {
>    $('.POTUS').not('#a_jackass').change();
>
> });
> On Tue, Jan 20, 2009 at 2:21 PM, rolfsf  wrote:
>
> > I just noticed that team Obama pushed a new website live today -
> > powered with jQuery!
>
> >http://www.whitehouse.gov


[jQuery] the new whitehouse.gov - jQuery powered

2009-01-20 Thread rolfsf

I just noticed that team Obama pushed a new website live today -
powered with jQuery!

http://www.whitehouse.gov



[jQuery] Re: jQuery Tab not working properly in IE 6, 7

2009-01-19 Thread rolfsf

UI Tabs css changed with the most recent updates - jQuery 1.3 and
jQuery UI 1.6rc5, so make sure you've made the appropriate updates to
your css ( I just updated as well, and I noticed similar issues before
I updated all of my css)
http://docs.jquery.com/UI/Theming
http://docs.jquery.com/UI/Theming/API
http://docs.jquery.com/UI/Tabs/Theming


On Jan 19, 3:08 am, Rith  wrote:
> Dear Support,
>
> My name is rith , I am one of who using JQuery Tab.
> The Tab has problem with the  in IE 6 and IE 7 .When i load the page
> in IE 6, or IE 7 i see the tab display fine ( Full image
> tab.png ) .But when i mouse over or click the tab , the tab image not
> display properly at the right corner of each tabs( see only the white
> space between ).
>
> Please help me to resolve this problem or guide me how to do it  .I
> would like to thank you in advance for help .
>
> Best Regards,
> Rith


[jQuery] UI Tabs, UI Datepicker, ajax...

2009-01-16 Thread rolfsf

using jQuery 1.3 and jQuery UI 1.6r5

I've got some ajax tabs.

//initialize tabs
$("ul.tabs-nav").tabs(
defaults = {
 navClass: 'tabs-nav',
 selectedClass: 'tabs-selected',
 unselectClass: 'tabs-unselect',
 disabledClass: 'tabs-disabled',
 panelClass: 'tabs-panel',
 hideClass: 'tabs-hide',
 loadingClass: 'tabs-loading'
}
);


Some of the tab contents contain UI Datepicker enabled textboxes.

//initialize datepicker
$('input.datepicker').datepicker({
hideIfNoPrevNext: true,
dateFormat: "M d, yy",
showOn: "both",
buttonImage: 
"../assets/images/brand/icons/icon_calendar.gif",
buttonImageOnly: true
});


When the content loads, the Datepicker needs to be re-initialized...
but I can't quite figure this out. The UI Tabs documentation and API
seems to have changed from the old jquery.tabs plugin... or maybe it's
me :-(

help?


[jQuery] jQuery 1.3 live() vs listen/intercept plugins

2009-01-16 Thread rolfsf

I'm trying to understand where the new live() fits in to the world of
event delegation, and plugins like listen and intercept

What are the arguments for one approach over the other?

thanks!


[jQuery] Re: Tabs Documentation

2009-01-15 Thread rolfsf

I was not logged in, so that's a partial confirmation

On Jan 15, 12:35 pm, "Richard D. Worth"  wrote:
> Someone mentioned that this may be related to whether you are logged in or
> not. I haven't had a chance to look into this yet. Just throwing it out, in
> case it helps anyone.
>
> - Richard


[jQuery] Re: Tabs Documentation

2009-01-15 Thread rolfsf

I get a "Media Wiki Internal Error" at that URL - have been seeing
that for a couple days

On Jan 15, 10:05 am, Marta Figueiredo  wrote:
> Hi,
>
> Have you triedhttp://docs.jquery.com/UI/Tabs?
> It seems to be working..
> M.
>
> Jared wrote:
> > Hi
>
> > The documentation page for Tabs has not been working for a couple of
> > days, any idea when it will be available again?
>
> > Thanks


[jQuery] Re: table striping - skip hidden rows

2009-01-12 Thread rolfsf

that's too easy - it can't be right ;-)

I guess my mistake was trying to use the nth-child(even)?


On Jan 12, 12:36 pm, Karl Swedberg  wrote:
> Simpler still would be this:
>
> $(this).find("tbody tr:visible:even").addClass("alt");
>
> --Karl


[jQuery] table striping - skip hidden rows

2009-01-12 Thread rolfsf

I have a table with multiple tbody's. Within each tbody there are a
number of rows that can be hidden or shown by clicking on a link. I'm
using the following function to stripe alternating rows:

jQuery.fn.stripeTable = function(){
$(this).find("tbody 
tr:nth-child(even)").addClass("alt");
}

but now I'm trying to account for hidden rows, so that when I click to
hide some rows I the striping is revised

I can't quite work out the syntax to filter first for visible rows,
then find even rows among those

can anyone assist?



[jQuery] Re: Anyone using jQuery with Tapestry 5?

2009-01-10 Thread rolfsf

Thanks for the reply

At the time of my posting I had been told only that there was a
conflict. I've since learned that the conflict is between Prototype
(which is integrated into Tapestry) and jQuery.

jQuery.noConflict() to the rescue  - now I just need to figure out the
best method



On Jan 9, 11:21 pm, "jQuery Lover"  wrote:
> Hello there,
>
> There are no special means or specific incorporations of jQuery to
> some framework nor to a programming languages. Tapestry is not an
> exception. Use jQuery to do your front end work, use Tapestry to
> generate html you need.
>
> All you need is a java utility classes to convert your java objects to
> json format. You can download and find out more about json java
> classes here:http://www.json.org/java/


[jQuery] Anyone using jQuery with Tapestry 5?

2009-01-09 Thread rolfsf

I've recently started doing some front end design for a team who are
working in Tapestry 5 - would love to know if there is anyone on the
list who has experience incorporating jQuery into Tapestry, and if
there are any known issues

thanks!


[jQuery] smooth text animation - what am I doing wrong?

2008-12-02 Thread rolfsf

I'm trying to simply scroll some text within a div via the animation()
method

it seems to be kind of jerky - especially Firefox (I've looked on both
Mac & WinXP)

here's a quick sample:
http://www.monkeypuzzle.net/testfiles/jquery/scrolltext/ff-animated-text.htm

it's actually worse within my application page - so I'm thinking
there's some combination of css rules that might make things worse?
Has anyone run across this one?


[jQuery] Re: asp.net and jquery - reactions to this letter

2008-11-20 Thread rolfsf

He does like to complain, but he's a very good guy and a very good
programmer. I sincerely hope he joins this conversation and that some
of these comments, ideas, and folks might coax him back for a second
look - I've never had the depth of knowledge (of either javascript,
jquery or .net) to assist him - and I know he's never touched on
jQuery's best stuff. It's been good for me, anyway, to hear from so
many ASP.net developers who are using it regularly.

On Nov 19, 8:33 pm, ajpiano <[EMAIL PROTECTED]> wrote:
> sounds like someone wants to complain about his lack of a clue rather
> than get one.
>
> --adam
>


[jQuery] Re: asp.net and jquery - reactions to this letter

2008-11-20 Thread rolfsf

Perhaps as jQuery gets incorporated into VS, more resources
specifically for ASP.net + jQuery will appear, and that will help with
the 'mindset' issue that George speaks of. I appreciate all of these
comments

On Nov 19, 1:48 pm, Berke <[EMAIL PROTECTED]> wrote:
> I have been the sole developer for the last 9 months on a site that
> was using ASP.Net Web Forms, & Component Art's Controls when I
> inherited it since then I have added many of the controls from their
> Ajax toolkit and within the last month have started using jquery. So
> far I have had zero clashes, and now have a wide variety of tools to
> solve the problems, I'm faced. I'm also starting to go back and clean
> out my older pre jquery javascript.
>
> I've also had success using jquery to call wcf services & page methods
> which a lot of success (there were some blog posts out there but I
> don't have the links anymore). I am using all of these technologies
> together in some of my more complex pages.
>
> On Nov 19, 12:34 pm, George Adamson <[EMAIL PROTECTED]>
> wrote:
>
> > I'm very surprised by his comments. We always rely on jQuery to get
> > grips with the monster that is ASP.Net+AJAX.Net, regardless of project
> > size.
>
> > jQuery's extraordiary convenience requires a slightly different
> > mindset from conventional .net languages (one that I miss on the
> > server side!) so perhaps the author could use some help to learn more
> > about it.
>
> > On Nov 18, 9:52 pm, rolfsf <[EMAIL PROTECTED]> wrote:
>
> > > is it truly a monster?
> > >http://reddevnews.com/response/response.aspx?rdnid=1189-Hide quoted text -
>
> > - Show quoted text -


[jQuery] Re: asp.net and jquery - reactions to this letter

2008-11-18 Thread rolfsf

Thanks Jack

Are there any asp.net + jquery blogs/resources/developer links that
are particularly good? It's difficult for me to gauge how good (clean
code, solid principles, brilliant thinking) some of the asp.net
oriented jquery postings on the web are as I don't know it. Any
recommendations I can pass on?

- rolfsf

On Nov 18, 3:52 pm, Jack Killpatrick <[EMAIL PROTECTED]> wrote:
> We've done a number of asp.net projects that use jQuery heavily. We do not 
> use the MS Ajax stuff, because it's not vendor neutral. Many of our apps use 
> C# web services and js-based widgets rendered client-side via Trimpath 
> javascript Templates, with some tie-ins to the asp.net security model. The 
> main hurdles we've found have been relatively easy to workaround and have 
> nothing to do with jquery:
> 1. asp.net forms by default render the whole page inside a single form, which 
> means we can't nest forms easily unless we override the default asp.net forms 
> behavior, which then introduces some other side-effects. In general, we've 
> been able to work around this limitation pretty easily.
> 2. asp.net controls render with id's that asp.net creates (so that nested 
> objects can be managed by asp.net's intrernal logic). Because of that, we add 
> a sprinkle of code sometimes that passes the id's of the controls we want to 
> touch into a js init function, then assign those values to our js vars inside 
> our js libraries. That said, we only have to do that when we want the js to 
> be aware of some controls rendered by asp.net.
> Firebug's our primary js debugging tool and has worked out fine. Sometimes we 
> use the MS script debugger, but only because there's no firebug in IE.
> - Jack
> rolfsf wrote:Are any of these clashes with asp.net that you and c.barr refer 
> to anything that could be remedied by the jQuery Core team if they know about 
> it? Or are these due to deeper structural philosophies that are unlikely to 
> be resolved any time soon? On Nov 18, 2:27 pm, "Armand Datema"<[EMAIL 
> PROTECTED]>wrote:mm Ive notices some clashes with asp.net but there is plenty 
> info around ( from some of the top .net guys that realy take Jquery and 
> asp.net combo to the edge.) how to make it deal wit this much better. Problem 
> is that a lot of the ajax is hardwired into .net and therefore jquery 
> alternatives take a bit more time but after that its much cleaner and easier 
> to modify. He does have a point wit the debugging but I dont see that as such 
> a big point, if you combine the .net debugging and firebug you can pretty 
> much almost pinpoint your errors. If you are not realy stuck too much into 
> the .net toolkit and dare to step outside of the bounds a bit Jquery in teh 
> end will only save time On Tue, Nov 18, 2008 at 10:52 PM, rolfsf<[EMAIL 
> PROTECTED]>wrote:A friend had sent this rant in to microsoft, regarding 
> jquery, which is published on their developer site. Not being an asp.net 
> developer, I don't know what to make of his points. I'd be interested to hear 
> from some asp.net developers who have embraced jquery - is it truly a 
> monster?http://reddevnews.com/response/response.aspx?rdnid=1189Thanks!-- 
> Armand Datema CTO SchwingSoft


[jQuery] Re: asp.net and jquery - reactions to this letter

2008-11-18 Thread rolfsf

Are any of these clashes with asp.net that you and c.barr refer to
anything that could be remedied by the jQuery Core team if they know
about it? Or are these due to deeper structural philosophies that are
unlikely to be resolved any time soon?


On Nov 18, 2:27 pm, "Armand Datema" <[EMAIL PROTECTED]> wrote:
> mm Ive notices some clashes with asp.net but there is plenty info around (
> from some of the top .net guys that realy take Jquery and asp.net combo to
> the edge.) how to make it deal wit this much better. Problem is that a lot
> of the ajax is hardwired into .net and therefore jquery alternatives take a
> bit more time but after that its much cleaner and easier to modify.
>
> He does have a point wit the debugging but I dont see that as such a big
> point, if you combine the .net debugging and firebug you can pretty much
> almost pinpoint your errors.
>
> If you are not realy stuck too much into the .net toolkit and dare to step
> outside of the bounds a bit Jquery in teh end will only save time
>
> On Tue, Nov 18, 2008 at 10:52 PM, rolfsf <[EMAIL PROTECTED]> wrote:
>
> > A friend had sent this rant in to microsoft, regarding jquery, which
> > is published on their developer site. Not being an asp.net developer,
> > I don't know what to make of his points. I'd be interested to hear
> > from some asp.net developers who have embraced jquery - is it truly a
> > monster?
>
> >http://reddevnews.com/response/response.aspx?rdnid=1189
>
> > Thanks!
>
> --
> Armand Datema
> CTO SchwingSoft


[jQuery] asp.net and jquery - reactions to this letter

2008-11-18 Thread rolfsf

A friend had sent this rant in to microsoft, regarding jquery, which
is published on their developer site. Not being an asp.net developer,
I don't know what to make of his points. I'd be interested to hear
from some asp.net developers who have embraced jquery - is it truly a
monster?

http://reddevnews.com/response/response.aspx?rdnid=1189

Thanks!


[jQuery] Re: jQuery Tabs: CSS Bug

2008-11-12 Thread rolfsf

looks like you need to clear your  float

you could probably just add clear:both to the ui-tabs-panel rule

ui-tab-panel {
clear: both;
}

(assuming Klaus' ie-specific display: inline-block isn't working for
whatever reason)


On Nov 12, 2:45 pm, ripcurlksm <[EMAIL PROTECTED]> wrote:
> I am having problems with the gray line that is supposed to appear at the
> bottom of the tabs. Instead it is appearing at the top of the tabs as shown
> here:
>
> http://www.nabble.com/file/p20471209/tabs-bug.jpg
>
> I have a copy of this displaying correctly, when I add it to my site it gets
> tweaked. Ive DISABLED all CSS except for the jQuery tabs CSS and its still
> showing like this. Ive also tried to use FireBug to examine the CSS that is
> used and I cant find the problem.
> --
> View this message in 
> context:http://www.nabble.com/jQuery-Tabs%3A-CSS-Bug-tp20471209s27240p2047120...
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] jquery styleswitch - flex width independent of skin?

2008-11-07 Thread rolfsf

I'm using Kelvin Luck's styleswitch script (http://www.kelvinluck.com/
2006/05/switch-stylesheets-with-jquery/)
 - it works as designed. But, what I want to do is essentially have 2
sets of style switches -- with one set I'll change the skin - colors,
etc.  With the other, I'll switch between flexible width and fixed
width. As implemented, clicking on the "flex" css link will disable
the "skin" css, and vice versa.

How do I get them to work independently, as alternates to the base
style? Any help would be appreciated!





[jQuery] Re: Slide Show (S6) Autoplay Addon Beta (w/ Scroll-Up Effect) - jQuery Animate in Action

2008-10-15 Thread rolfsf

Chuck,

I suspect it's only the svg object being used for the background,
which really doesn't have anything to do with the 'code' - only the
implementation. I'm looking at it in Safari, so I'm only guessing.

Perhaps Gerald can add a simple workaround, or an example without the
gradient



On Oct 15, 5:30 am, "C.Everson" <[EMAIL PROTECTED]> wrote:
> On Tue, 14 Oct 2008 21:51:46 -0700 (PDT), Gerald wrote:
> >   See an example slide show in action 
> > @http://slideshow.rubyforge.org/autoplay.html
>
> The URL presents this message:
>
> "Microsoft's Internet Explorer browser has no built-in vector graphics
> machinery required for "loss-free" gradient background themes.
>
> Please upgrade to a better browser such as Firefox, Opera, Safari or others
> with built-in vector graphics machinery and much more."
>
> I'm NOT trying to be critical, but while everyone certainly appreciates
> your effort and contribution, IMHO it does not really help anyone since IE
> is the defacto standard for browsers.
>
> Love it or hate it, we all have to deal with it.
>
> Personally I don't see any point in pursuing any code that won't run on IE
> other than as "hobby code"
>
> Just my $.02
>
> Chuck


[jQuery] Re: Basic problem - using .click and .hover together on elements

2008-10-11 Thread rolfsf

If you're only trying to get a color change on an anchor when you
hover, then just do that with CSS - there's no need to use javascript
for that

li a { color: black }
li a:hover { color: red }

The only real hitch is if you're trying to hover over something other
than an anchor (like a div or a span), and you have to support IE6.
IE6 only supports hover on anchors, while every other modern browser
supports hover on just about anything.  (IE7+ properly support hover)

rolfsf



On Oct 11, 12:56 pm, jez_p <[EMAIL PROTECTED]> wrote:
> Thank you very much for your help Eric - and for replying so quickly.
> All I had left to do was to give the default menu item the class of
> "clicked" and it works just how I want it. Thanks again.
>
> On Oct 11, 8:24 pm, Eric <[EMAIL PROTECTED]> wrote:
>
> > Great question, jez_p!
>
> > You've described a common problem. You'll be happy to know that
> > there's a solution, _and_ that it will help you out in a number of
> > other ways as you move forward. The solution involves separating the
> > 'clicked' and 'hovered' states, and then specifying that the link is
> > red on either 'clicked' or 'hovered'.  We're going to move this code
> > over to use CSS classes, and we'll use a couple of the following
> > jQuery functions ( seehttp://docs.jquery.com/Attributes):
> > - addClass()
> > - removeClass()
>
> >   $('li a').hover (function() {
> >                   $(this).addClass('hover');
> >                 },
> >             function(){
> >                   $(this).removeClass('hover');
> >                 }
> >         );
>
> >   $('li a').click (function() {
> >                   $('li a.clicked').removeClass('clicked');
> >                   $(this).addClass('clicked');
> >         });
>
> > and in your CSS file:
>
> > /* normal nav link */
> > li a {    color: black }
>
> > /* highlighted nav link */
> > li a.hover, li a.clicked { color: red }
>
> > One nice thing is that your style is separated form your code, so you
> > can hand it off to a designer who may not know Javascript.  Also, you
> > can easily assign special styles to either hover or clicked separately
> > if you want.
>
> > -E
>
> > On Oct 11, 2:29 pm, jez_p <[EMAIL PROTECTED]> wrote:
>
> > > I'm sure this has a very simple solution, but I am just starting out
> > > and can't work it out, so I would appreciate it if anyone could give
> > > me some help.
>
> > > I have a basic text menu, which when the menu items are clicked the
> > > page content changes. What I want is for the menu item text to change
> > > color when hovered over - from black to red, and for the menu item
> > > that has been clicked to be red. The hovering part I have is:
>
> > >   $('li a').hover (function() {
> > >                   $(this).css({color:'red'});
> > >                 },
> > >             function(){
> > >                   $(this).css({color:'black'});
> > >                 }
> > >         );
>
> > > For the clicking part I have:
>
> > >   $('li a').click (function() {
> > >                   $('li a').css({color:'black'}); //to reset the menu 
> > > items to
> > > black
> > >                   $(this).css({color:'red'});
>
> > >         });
>
> > > The problem I have is that the mouse pointer is still hovering over
> > > the menu item after it has been clicked, and when it is moved away it
> > > resets all the menu items back to black - whereas I want it to be red.
>
> > > I hope I have explained myself clearly.


[jQuery] Re: ANNOUNCE: jQuery listnav plugin

2008-10-07 Thread rolfsf

craig - I notice that the Location: X and Category: Y content are both
lists/list items. I haven't looked at the script, but I suspect it may
be hiding and counting those - you're problem with both the high count
and the disappearing content is the same problem. It's counting
Category in the "C" count, and the Location in the L count., and then
hiding that content in all but the C and L lists.

rolfsf



On Oct 7, 7:09 am, "craig.kaminsky" <[EMAIL PROTECTED]> wrote:
> Hi, Jack,
>
> I have just tried it out on a site. It works pretty darn well. We've
> noticed two things thus far:
> 1. The "count" for each letter and the total is off. For example, this
> page (http://www.experiencecoloradosprings.com/index.cfm/go/ecs.pages/
> id/86/title/Hotels,%20Lodging,%20Accommodations/memcat/5) has 170
> listings displayed but when you hover over the ALL link, it reads 508.
> The troublesome letters, in this case, appear to be C and L.
> 2. When you click to filter, some of the content disappears (notice
> how there are two entries/lines for Location: X and Category: Y with
> each listing. When you click a letter to filter, those go away but
> reappear when you press "All".
>
> You can see it in action on other pages in this site under the "Stay
> Eat and Play" drop-down (the Dining, Lodging, Activities, Arts,
> Shopping, and Services links all utilize it in their output).
>
> Excellent work on this plugin and thank you!! We're very psyched with
> it and it beats the #$&@ out of what we had before :)!
>
> Best,
> Craig
>
> On Oct 6, 10:41 am, Jack Killpatrick <[EMAIL PROTECTED]> wrote:
>
> > Hi Ettiene, how'd using it go for you?
>
> > Thanks to everyone else for the initial feedback. I'm interested to hear
> > if anyone has implemented it anywhere. ?
>
> > - Jack
>
> > Ettiene wrote:
> > > Excellent stuff man! I'm already busy using it hehe
>
> > > Ettiene


[jQuery] Re: Set height of element depending on only on its own position and window height?

2008-09-30 Thread rolfsf

I might add that you may be able to accomplish the same thing in
'modern' browsers (e.g. not IE6) with just css, using absolute
positioning. Just set your right, left and bottom to, for example,
10px. (IE6 can't handle positioning on 3 sides).

On Sep 30, 11:58 am, rolfsf <[EMAIL PROTECTED]> wrote:
> Glad you solved it. I actually had a mistake in my last line, but
> here's a working version:
>
> http://www.monkeypuzzle.net/testfiles/jquery/divSize.htm
>
> I added a window resize function so it always adapts to the window. As
> you can see, nothing is absolutely positioned, and I threw a mixture
> of elements above the div I wanted to size, just to confirm that it
> really doesn't care what's there - it's measuring the offset from the
> top of the window.
>
> On Sep 30, 3:26 am, Kabelkultur Gotland <[EMAIL PROTECTED]> wrote:
>
> > Well, I managed to solve it.
>
> > Using option relativeTo for the offset and setting the relativeTo to
> > use my header div that is always present, and always absolutely
> > positioned at top:0;
>
> > Now I have a div that takes up whatever space is left down to bottom
> > of viewport, just like I wanted. Thanks for all help!
>
> > On 30 Sep, 10:18, Kabelkultur Gotland <[EMAIL PROTECTED]> wrote:
>
> > > Well, thanks, but it turns out that it does exactly the same as my own
> > > function.
> > > If I have a div above it with a SET TOP position, e.g. css: top:0; -
> > > or whatever - it works.
> > > But if I don't have nothing but a bunch of  tags above the div,
> > > or if I set the div above to psition:relative and remove the set top
> > > position, it doesn't work anymore.
> > > I really need some way to get the top offset for my div from the top
> > > edge of the window, no matter what may or may not be above the div in
> > > the DOM tree, and so far no luck.
> > > But thanks for the effort, I appreciate it.
>
> > > /Torgil
>
> > > On 29 Sep, 21:26, rolfsf <[EMAIL PROTECTED]> wrote:
>
> > > > try this:
>
> > > > var wh = $(window).height();                            // window height
> > > > var mt = $('#myDiv').offset().top;                              // top 
> > > > position of #myDiv
>
> > > > $(mt).css('height', wh - mt - 20 + 'px');                       // set 
> > > > height of #myDiv
>
> > > > On Sep 29, 8:33 am, Kabelkultur Gotland <[EMAIL PROTECTED]> wrote:
>
> > > > > Well, the $(window).height() gets the height for me.
>
> > > > > What I need is something to measure the distance from the window top
> > > > > and down to the element top.
> > > > > And then subtract it from the window height, minus another 20 pix ad
> > > > > use that value as height for the div.
>
> > > > > If the window is 1000 px high, and the div starts 300px down, I'd like
> > > > > to get 100 - 300 - 20 = 680
> > > > > And then apply this as height for the div.
>
> > > > > And this needs to be done without mixing in other elements that might
> > > > > or might not be part of the dom tree between the window top and the
> > > > > elements top position.
>
> > > > > So I guess that the problem lies within the second measuring parameter
> > > > > of my function:
> > > > >    $ (".tableHolder").offset().top - this for some reason uses other
> > > > > positioned elements for its calculation, and I need it not to.
>
> > > > > Regards, Torgil - kabelkultur.se- Dölj citerad text -
>
> > > > - Visa citerad text -- Dölj citerad text -
>
> > > - Visa citerad text -


[jQuery] Re: Set height of element depending on only on its own position and window height?

2008-09-30 Thread rolfsf

Glad you solved it. I actually had a mistake in my last line, but
here's a working version:

http://www.monkeypuzzle.net/testfiles/jquery/divSize.htm

I added a window resize function so it always adapts to the window. As
you can see, nothing is absolutely positioned, and I threw a mixture
of elements above the div I wanted to size, just to confirm that it
really doesn't care what's there - it's measuring the offset from the
top of the window.



On Sep 30, 3:26 am, Kabelkultur Gotland <[EMAIL PROTECTED]> wrote:
> Well, I managed to solve it.
>
> Using option relativeTo for the offset and setting the relativeTo to
> use my header div that is always present, and always absolutely
> positioned at top:0;
>
> Now I have a div that takes up whatever space is left down to bottom
> of viewport, just like I wanted. Thanks for all help!
>
> On 30 Sep, 10:18, Kabelkultur Gotland <[EMAIL PROTECTED]> wrote:
>
> > Well, thanks, but it turns out that it does exactly the same as my own
> > function.
> > If I have a div above it with a SET TOP position, e.g. css: top:0; -
> > or whatever - it works.
> > But if I don't have nothing but a bunch of  tags above the div,
> > or if I set the div above to psition:relative and remove the set top
> > position, it doesn't work anymore.
> > I really need some way to get the top offset for my div from the top
> > edge of the window, no matter what may or may not be above the div in
> > the DOM tree, and so far no luck.
> > But thanks for the effort, I appreciate it.
>
> > /Torgil
>
> > On 29 Sep, 21:26, rolfsf <[EMAIL PROTECTED]> wrote:
>
> > > try this:
>
> > > var wh = $(window).height();                            // window height
> > > var mt = $('#myDiv').offset().top;                              // top 
> > > position of #myDiv
>
> > > $(mt).css('height', wh - mt - 20 + 'px');                       // set 
> > > height of #myDiv
>
> > > On Sep 29, 8:33 am, Kabelkultur Gotland <[EMAIL PROTECTED]> wrote:
>
> > > > Well, the $(window).height() gets the height for me.
>
> > > > What I need is something to measure the distance from the window top
> > > > and down to the element top.
> > > > And then subtract it from the window height, minus another 20 pix ad
> > > > use that value as height for the div.
>
> > > > If the window is 1000 px high, and the div starts 300px down, I'd like
> > > > to get 100 - 300 - 20 = 680
> > > > And then apply this as height for the div.
>
> > > > And this needs to be done without mixing in other elements that might
> > > > or might not be part of the dom tree between the window top and the
> > > > elements top position.
>
> > > > So I guess that the problem lies within the second measuring parameter
> > > > of my function:
> > > >    $ (".tableHolder").offset().top - this for some reason uses other
> > > > positioned elements for its calculation, and I need it not to.
>
> > > > Regards, Torgil - kabelkultur.se- Dölj citerad text -
>
> > > - Visa citerad text -- Dölj citerad text -
>
> > - Visa citerad text -


[jQuery] Re: Set height of element depending on only on its own position and window height?

2008-09-29 Thread rolfsf

try this:

var wh = $(window).height();// window height
var mt = $('#myDiv').offset().top;  // top position 
of #myDiv

$(mt).css('height', wh - mt - 20 + 'px');   // set height 
of #myDiv



On Sep 29, 8:33 am, Kabelkultur Gotland <[EMAIL PROTECTED]> wrote:
> Well, the $(window).height() gets the height for me.
>
> What I need is something to measure the distance from the window top
> and down to the element top.
> And then subtract it from the window height, minus another 20 pix ad
> use that value as height for the div.
>
> If the window is 1000 px high, and the div starts 300px down, I'd like
> to get 100 - 300 - 20 = 680
> And then apply this as height for the div.
>
> And this needs to be done without mixing in other elements that might
> or might not be part of the dom tree between the window top and the
> elements top position.
>
> So I guess that the problem lies within the second measuring parameter
> of my function:
>    $ (".tableHolder").offset().top - this for some reason uses other
> positioned elements for its calculation, and I need it not to.
>
> Regards, Torgil - kabelkultur.se


[jQuery] Re: a little help - getting data pairs into input pairs

2008-09-05 Thread rolfsf

In case anyone has the same question, here's how I eventually did it:

jQuery.fn.loadData = function(){
var rows = $("#curveData tbody tr");

for (var trIdx = 0; trIdx < rows.length; 
trIdx++) {

var inputs = 
$(rows[trIdx]).find("input");

for (var inpIdx = 0; inpIdx < 
inputs.length; inpIdx++){

if (trIdx < d1.length) {
inputs[inpIdx].value = 
d1[trIdx][inpIdx];  // bind data
}
else {
inputs[inpIdx].value = 
''; // set to blank because there's no
data
}
}

}

}


On Sep 3, 5:05 pm, rolfsf <[EMAIL PROTECTED]> wrote:
> I have some data:
>
> d1 = [[5,10],[10,15],[12,15],[15,18],[20,23]]
>
> and I have a table with text inputs:
>
>                 
>                 
>                         
>                                 #
>                                 Quantity
>                                 Price
>                         
>                 
>                 
>                         
>                                 1
>                                  size="8">
>                                  size="8">
>                         
>                         
>                                 2
>                                  size="8">
>                                  size="8">
>                         
>
>                         ... etc ...
>
>                         
>                                 10
>                                  size="8">
>                                  size="8">
>                         
>                 
>         
>
> How do I load the data into the text inputs (assume I click a
> button#loadData)? There may same number of data pairs -or less- as
> there are input pairs.
>
> Thanks!


[jQuery] Re: jquery flot - integers only on x and/or y axis

2008-09-04 Thread rolfsf

this is my latest working concept... although I don't think it's
optimized at all, and I'm really hacking to get my concept across

http://www.monkeypuzzle.net/testfiles/jquery/flot/flot-test-11.htm

the favorites button should really load the data into the inputs, but
I don't yet understand how to go that direction. Also, the bars graph
doesn't work, probably because I need to set up the x-axis better.

Struggling to learn better javascript, so if you have any thoughts I'd
love to hear them!



On Sep 3, 11:03 am, "faizal iqbaal" <[EMAIL PROTECTED]> wrote:
> cool...let me have the code as well i'll also learn a new approach  or is it
> the same url
>
>
>
> On Wed, Sep 3, 2008 at 1:30 PM, rolfsf <[EMAIL PROTECTED]> wrote:
>
> > Yes - thanks Faizal. At least it pointed out the error I was making.
> > I'm not (currently) using $.extend, but I did separate the data set
> > options from the other chart options, and put them in a variable. Now
> > I'm trying to add a select that will allow the user to switch chart
> > styles - point, line, bar
>
> > On Sep 2, 10:19 pm, "faizal iqbaal" <[EMAIL PROTECTED]> wrote:
> > > did it work for ya
>
> > > On Tue, Sep 2, 2008 at 5:31 PM, faizal iqbaal <[EMAIL PROTECTED]
> > >wrote:
>
> > > > //modiefd ur file copy the code and run it
>
> > > > /**/
>
> > > >  > > >http://www.w3.org/TR/html4/loose.dtd";>
> > > > 
> > > >     
> > > >     
>
> > > >     #graphHolder {
> > > >         border: none;
> > > >         padding: 0px;
> > > >         margin: 10px;
> > > >         height: 200px;
> > > >         width: 400px;
> > > >         font-family: tahoma;
> > > >         font-size: 11px;
> > > >     }
>
> > > >     #curveData {
> > > >         margin: 10px;
> > > >     }
>
> > > >     
> > > >         
> > > >          > > > src="jquery.js">
> > > >          > > > src="jquery.flot.js">
> > > >         
>
> > > >         
>
> > > >             $().ready(function(){
>
> > > >                 $.plot($("#graphHolder"),[]);
>
> > > >                 $('#curveData input').change(function() {
> > > >                     var d1 = [];
> > > >                     $('#curveData tbody tr').each(function() {
> > > >                         tr = $(this);
> > > >                         pair = [];
> > > >                         tr.find('input.qty').val() &&
> > > > tr.find('input.price').val() && pair.push( tr.find('input.qty').val(),
> > > > tr.find('input.price').val() ) && d1.push( pair );
> > > >                     });
>
> > > >                     var chartOptions={
> > > >                             yaxis: { min:0 },
> > > >                             color: "#bb",
> > > >                             data: d1,
> > > >                             points: { show: true },
> > > >                             lines: { show: true, fill: true, fillColor:
> > > > "rgba(255, 000, 000, 0.2)" }
> > > >                         } ;
>
> > > >                     /*
> > > >                     $.plot($("#graphHolder"), [
> > > >                         {
> > > >                             yaxis: { min:0 },
> > > >                             color: "#bb",
> > > >                             data: d1,
> > > >                             points: { show: true },
> > > >                             lines: { show: true, fill: true, fillColor:
> > > > "rgba(255, 000, 000, 0.2)" }
> > > >                         }
> > > >                     ]);
> > > >                     */
> > > >                     $.plot($("#graphHolder"), [{ data: d1,
> > > > color:"#bb"}],$.extend(true, {}, chartOptions, {yaxis: { min: 0
> > }}));
>
> > > >                 });
>
> > > >             });
> > > >         
>
> > > >     
> > > >     
> > > >             
> >

[jQuery] a little help - getting data pairs into input pairs

2008-09-03 Thread rolfsf

I have some data:

d1 = [[5,10],[10,15],[12,15],[15,18],[20,23]]

and I have a table with text inputs:




#
Quantity
Price




1




2




... etc ...


10






How do I load the data into the text inputs (assume I click a
button#loadData)? There may same number of data pairs -or less- as
there are input pairs.

Thanks!


[jQuery] Re: jquery flot - integers only on x and/or y axis

2008-09-03 Thread rolfsf

Yes - thanks Faizal. At least it pointed out the error I was making.
I'm not (currently) using $.extend, but I did separate the data set
options from the other chart options, and put them in a variable. Now
I'm trying to add a select that will allow the user to switch chart
styles - point, line, bar



On Sep 2, 10:19 pm, "faizal iqbaal" <[EMAIL PROTECTED]> wrote:
> did it work for ya
>
> On Tue, Sep 2, 2008 at 5:31 PM, faizal iqbaal <[EMAIL PROTECTED]>wrote:
>
>
>
>
>
> > //modiefd ur file copy the code and run it
>
> > /**/
>
> >  >http://www.w3.org/TR/html4/loose.dtd";>
> > 
> >     
> >     
>
> >     #graphHolder {
> >         border: none;
> >         padding: 0px;
> >         margin: 10px;
> >         height: 200px;
> >         width: 400px;
> >         font-family: tahoma;
> >         font-size: 11px;
> >     }
>
> >     #curveData {
> >         margin: 10px;
> >     }
>
> >     
> >         
> >          > src="jquery.js">
> >          > src="jquery.flot.js">
> >         
>
> >         
>
> >             $().ready(function(){
>
> >                 $.plot($("#graphHolder"),[]);
>
> >                 $('#curveData input').change(function() {
> >                     var d1 = [];
> >                     $('#curveData tbody tr').each(function() {
> >                         tr = $(this);
> >                         pair = [];
> >                         tr.find('input.qty').val() &&
> > tr.find('input.price').val() && pair.push( tr.find('input.qty').val(),
> > tr.find('input.price').val() ) && d1.push( pair );
> >                     });
>
> >                     var chartOptions={
> >                             yaxis: { min:0 },
> >                             color: "#bb",
> >                             data: d1,
> >                             points: { show: true },
> >                             lines: { show: true, fill: true, fillColor:
> > "rgba(255, 000, 000, 0.2)" }
> >                         } ;
>
> >                     /*
> >                     $.plot($("#graphHolder"), [
> >                         {
> >                             yaxis: { min:0 },
> >                             color: "#bb",
> >                             data: d1,
> >                             points: { show: true },
> >                             lines: { show: true, fill: true, fillColor:
> > "rgba(255, 000, 000, 0.2)" }
> >                         }
> >                     ]);
> >                     */
> >                     $.plot($("#graphHolder"), [{ data: d1,
> > color:"#bb"}],$.extend(true, {}, chartOptions, {yaxis: { min: 0 }}));
>
> >                 });
>
> >             });
> >         
>
> >     
> >     
> >             
> >             
> >                 
> >                     #
> >                     Quantity
>
> >                     Price
> >                 
> >             
> >             
> >                 
> >                     1
> >                      > size="8">
> >                      > size="8">
>
> >                 
> >                 
> >                     2
> >                      > size="8">
> >                      > size="8">
> >                 
> >                 
> >                     3
>
> >                      > size="8">
> >                      > size="8">
> >                 
> >                 
> >                     4
> >                      > size="8">
> >                      > size="8">
> >                 
>
> >                 
> >                     5
> >                      > size="8">
> >                      > size="8">
> >                 
> >                 
> >                     6
> >                      > size="8">
>
> >                      > size="8">
> >                 
> >                 
> >                     7
> >                      > size="8">
> >  

[jQuery] Re: jquery flot - integers only on x and/or y axis

2008-09-02 Thread rolfsf

Thanks Faizal

I tried setting the x and y axis with the min option, but it doesn't
seem to work... perhaps I've got some syntax wrong

http://monkeypuzzle.net/testfiles/jquery/flot/flot-test-3.htm






[jQuery] jquery flot - integers only on x and/or y axis

2008-09-02 Thread rolfsf

I've got this test page built using jquery flot to render a graph as
price/quantity pairs are input

I'm using the following jquery:
$().ready(function(){

$.plot($("#graphHolder"),[]);

$('#curveData input').change(function() {
var d1 = [];
$('#curveData tbody 
tr').each(function() {
tr = $(this);
pair = [];
tr.find('input.qty').val() && 
tr.find('input.price').val() &&
pair.push( tr.find('input.qty').val(), tr.find('input.price').val() )
&& d1.push( pair );
});

$.plot($("#graphHolder"), [
{
color: "#bb",
data: d1,
points: { show: true },
lines: { show: true, 
fill: true, fillColor: "rgba(255, 000,
000, 0.2)" }
}
]);
});


});


Does anyone know if it's possible to limit the x and y axis tickmarks
to integers?

And how do I make the x and y axis always start from 0, regardless of
where the first data point is?

Thanks!




[jQuery] Re: event delegation in jQuery - delegate vs listen vs ?

2008-08-19 Thread rolfsf

Thanks Mike,

I guess what I'm wrestling with, is what advantages the plugins offer
(I'm not that adept at javascript, but I'm hoping to 'sell' the
concept to others who are more adept at it). We have some big data
tables with lots of clicks, sometimes expanding rows, sometimes hovers
or clueTips, and sometimes the clicks will trigger a jqModal-
controlled window (hence my interest in how to work with jqModal in
this event delegation scenario).

I agree - the concept is brilliantly simple - and maybe that's what
makes me nervous :-)





On Aug 19, 2:10 pm, "Michael Geary" <[EMAIL PROTECTED]> wrote:
> If you really want to understand event delegation, you may want to just look
> at the raw code to implement it instead of a plugin. That way you can see
> how it actually works.
>
> It's really quite simple: You attach an event handler to some common parent
> element, and then check event.target on the incoming events to decide what
> to do with them.
>
> Here's an example. Suppose you have a thousand  elements on your page,
> and you want to intercept all clicks on them. You also want to intercept
> clicks on any other elements that have a "clickme" class and do something
> different with them - and you have a thousand of these too.
>
> You could do that easily with this jQuery code:
>
>     $(function() {
>         $('a').click( function() {
>             alert( 'Clicked A' );
>             return false;  // suppress standard click behavior
>         });
>         $('.clickme').click( function() {
>             alert( 'Clicked CLICKME' );
>         });
>     });
>
> That's short and simple... But behind the scenes it will install two
> thousand event handlers!
>
> Instead of that, you can do this:
>
>     $(function() {
>         $('body').click( function( event ) {
>             var $target = $(event.target);
>             if( $target.is('a') ) {
>                 alert( 'Clicked A' );
>                 return false;  // suppress standard click behavior
>             }
>             if( $target.is('.clickme') ) {
>                 alert( 'Clicked CLICKME' );
>             }
>         });
>     });
>
> Now you're only installing *one* event handler instead of two thousand.
>
> That's really all there is to event delegation. You don't have to use
> $target.is(...) - you can write any code you wish to distinguish among the
> different elements. The DOM element that triggered the event is in
> event.target.
>
> The event delegation plugins make it even simpler to write this code, of
> course.
>
> -Mike
>
> > I'm trying to get my head around the concept of event
> > delegation, and have been reading about jquery.listen and
> > jquery.delegate and LowPro for jQuery... and I'm a little
> > confused as to the strengths and weaknesses, or scope,  of
> > each approach.
>
> > Can anyone offer some wise words on this topic?
>
> > How does one integrate a plugin like jqModal with one of
> > these event delegation plugins?
>
> > any thoughts are appreciated!


[jQuery] event delegation in jQuery - delegate vs listen vs ?

2008-08-19 Thread rolfsf

I'm trying to get my head around the concept of event delegation, and
have been reading about jquery.listen and jquery.delegate and LowPro
for jQuery... and I'm a little confused as to the strengths and
weaknesses, or scope,  of each approach.

Can anyone offer some wise words on this topic?

How does one integrate a plugin like jqModal with one of these event
delegation plugins?

any thoughts are appreciated!




[jQuery] using scrollTo to keep dynamically added content scrolled into view?

2008-07-16 Thread rolfsf

If one has a textarea or editable div with overflow: auto, and one
starts typing and filling the div, due to focus on the cursor the
scroll will keep the newly added lines in view. But if one is adding
the content dynamically, the newly added lines will appear out of view
- there's no cursor to focus on.

Question - can the scrollTo plugin be used to automatically keep the
last line of text in view? Is there a simple way to do this?

Thanks!


[jQuery] Re: highlight and fade a row

2008-06-11 Thread rolfsf

ok - I partially solved this by setting my default rows in this
instance to be white, and then using the following:

$('#test').click(function() {
var theRow = $('#myRow td');
var origColor = $('#myRow td').css("backgroundColor");

$(theRow).css({backgroundColor: '#ff0'});
setTimeout(function() {
$(theRow).animate({backgroundColor: origColor}, 
1000);
}, 3000);
});

However, row hover effects get disabled on the affected row after this
is run. So now I need to remove the inline style for background color
that the script ends with

 should get set to
something like 




[jQuery] highlight and fade a row

2008-06-11 Thread rolfsf

I want to highlight some rows with a background color, then fade back
to original background color after 10 seconds. I've seen various
solutions (using the jquery.color.js plugin), but the issue I'm
stumbling on is that the rows in the table could have various
background colors or no background color (transparent) depending on
other factors (row striping, other event-based highlighting). By
default, they're transparent.

How do I determine the original background color setting, and return
it to that? Other than the default transparent, these colors are
typically set via a class (or multiple classes) on the TR

suggestions? Thanks!

rolf


[jQuery] Re: treeview async - callback on completion? (or some other way to do temporary "loading..." text)

2008-06-11 Thread rolfsf

Max,
The animation, obviously, is just a an icon that, if I remember
correctly, was set up as a css background image for li.placeholder.
The script then adds the .placeholder class to unloaded branches, and
removes the class when they load.
That's from memory, so I could be wrong...

rolf


On Jun 11, 4:50 am, "Max Williams (Brighton)"
<[EMAIL PROTECTED]> wrote:
> I actually just solved this, not with some animation but with some
> text:  i modified the jquery.treeview.async.js file to send a custom
> event after the "$.getJSON" block (line 44):
>
> jQuery(document).trigger('treeviewLoaded');
>
> Then in my javascript code that calls the tree i add the text to the
> tree ul and then hide it when the above event occurs:
>
>      //add some loading text:
>      jQuery("#prop-tree").append("loading... p>");
>
>      //set up call for the property tree, to get new branches as json
> when tree is expanded
>       jQuery("#prop-tree").treeview({
>         url: "/tree/children?for=<%= tree_name %>&random=<%=
> rand(10)%><%= extra_params.collect{|k,v| '&' + k.to_s + '=' +
> v.to_s}.join('')%>"
>       });
>
>       //hide the loading text once the tree has loaded
>       jQuery(document).bind('treeviewLoaded', function() {
>         jQuery("#loading-text").hide();
>       });
>
> It's not ideal as it's called every time a branch loads whereas it
> really only needs to be called the first time.  And it feels a bit
> dirty.  I'd still like to know how the animation works. :)
>
> thanks
> max
>
> On Jun 11, 10:29 am, "Max Williams (Brighton)"
>
> <[EMAIL PROTECTED]> wrote:
> > Hi rolf
>
> > yeah, that would do fine actually - i missed that.  Do you know how
> > that is generated?
>
> > thanks
> > max
>
> > On Jun 10, 5:41 pm, rolfsf <[EMAIL PROTECTED]> wrote:
>
> > > If you look at the async 
> > > demo:http://dev.jquery.com/view/trunk/plugins/treeview/demo/async.html
>
> > > in the first tree, click on item 3, and then on item 3.6 - you'll see
> > > a loading icon for a few seconds, then the branch will load. Is that
> > > what you're looking for?
>
> > > rolf
>
> > > On Jun 10, 9:10 am, "Max Williams (Brighton)"
>
> > > <[EMAIL PROTECTED]> wrote:
> > > > I'm using the async version of the treeview plugin to deal with a
> > > > rather large tree.  When the user first loads it there's nothing
> > > > there, and quite a delay before the main set of branches loads, and
> > > > i'd like to have some 'loading...' text there.
>
> > > > How can i get the treeview to signal when it's finished loading the
> > > > json, so i can remove the text?  Is there a simpler way to have some
> > > > "loading..." text displayed so that it will disappear when the tree
> > > > loads?
>
> > > > thanks
> > > > max


[jQuery] Re: treeview async - callback on completion? (or some other way to do temporary "loading..." text)

2008-06-10 Thread rolfsf

If you look at the async demo:
http://dev.jquery.com/view/trunk/plugins/treeview/demo/async.html

in the first tree, click on item 3, and then on item 3.6 - you'll see
a loading icon for a few seconds, then the branch will load. Is that
what you're looking for?

rolf

On Jun 10, 9:10 am, "Max Williams (Brighton)"
<[EMAIL PROTECTED]> wrote:
> I'm using the async version of the treeview plugin to deal with a
> rather large tree.  When the user first loads it there's nothing
> there, and quite a delay before the main set of branches loads, and
> i'd like to have some 'loading...' text there.
>
> How can i get the treeview to signal when it's finished loading the
> json, so i can remove the text?  Is there a simpler way to have some
> "loading..." text displayed so that it will disappear when the tree
> loads?
>
> thanks
> max


[jQuery] Re: help with array for flot

2008-06-05 Thread rolfsf


aquaone thank you!

I need to do a little reading up on what .push does

rolf

On Jun 5, 2008, at 3:09 PM, aquaone wrote:


$('#plot').click(function() {
var d1 = [];
$('#curveData tbody tr').each(function() {
tr = $(this);
pair = [];
tr.find('input.qty').val() && tr.find('input.price').val()  
&& pair.push( tr.find('input.qty').val(), tr.find('input.price').val 
() ) && d1.push( pair );

});
$.plot($("#graphHolder"), [
{
color: "#bb",
data: d1,
points: { show: true },
lines: { show: true }
}
]);
});






[jQuery] Re: help with array for flot

2008-06-04 Thread rolfsf


cool - that's part of what I need. Since I'm actually using inputs in  
the td's, wouldn't I need to get the value of the input within each td?


maybe I can figure that out from here...

(there's actually a plugin that converts tables to flot graphs... but  
since I'm using inputs in a table, I figured it wouldn't work)


thanks,
rolf



On Jun 4, 2008, at 7:39 PM, Leanan wrote:



This is kinda pseudocodish, but it should do what you want:
$('button selector').click(function()  {
  $('table tr').each(function() {
x = $(this + 'td:eq(1)');  //should grab the second td
y = $(this + 'td:eq(2)');  //should grab the third td
push(array,[x,y]);
  });
});

Of course if you have multiple tables you'll be iterating over all of
them, so you may need to an id to the table so that you can use that
to select the proper table.




[jQuery] help with array for flot

2008-06-04 Thread rolfsf

I'm playing with the flot plugin (http://code.google.com/p/flot/) and
need a little help

I want to take data from a series of text inputs (Quantity/Price
pairs) and plot them when a button is clicked.

I just don't understand enough about javascript and arrays to know how
to make an array from the inputs (I suspect it's simple)

I have this test page, which uses a hardcoded array to draw the graph:
http://www.monkeypuzzle.net/testfiles/jquery/flot/flot-test-1.htm

How do I get from:


1




2




3




4




5





to this?:

var d1 = [[5, 10], [10, 15], [20, 20], [30, 25], [40, 25]];

thanks!
rolf


[jQuery] Re: Best way to do tree-navigator + content-pane layout?

2008-05-31 Thread rolfsf

Have you tried the jquery splitter plugin?
http://methvin.com/jquery/splitter/default.html


On May 31, 6:38 pm, Sophie <[EMAIL PROTECTED]> wrote:
> I am trying to something like this, with a tree navigator in the left
> and a content pane on its right. What is the best way to make the
> right edge of the tree navigator movable (i.e. T is resizable, but C
> resizes simultaneously)?
>
> 
> |         |                 |
> |         |                 |
> |   T    |      C         |
> |         |                 |
> 
>
> Thanks.


[jQuery] accordion 1.5 - fixed height with scrolling

2008-05-21 Thread rolfsf

I had an accordion working with an older version of the
jquery.accordion plugin, such that the accordion was a fixed height,
and if an individual 'drawer' had too much content it scrolled.

accordion v1.5 seems to override my overflow settings. It may just be
a different option setting, but I can't find a demo that does the same
thing.

suggestions?


[jQuery] Re: Autocomplete - access to events

2008-05-19 Thread rolfsf

Thanks Jörn,

I'll pass this info on...

We tend to run into performance issues with this because we might
typically get over 20 autocompletes on the same page, and they're
pulling from a list of about a thousand items. A lot is happening on
the page (in the background) so we look for ways to optimize whenever
possible.



On May 19, 11:03 am, "Jörn Zaefferer" <[EMAIL PROTECTED]>
wrote:
> None of that is trivial out-of-the-box. The last point sounds like an
> optimization that isn't really necessary unless you experienced an
> actual performance hit.
>
> The second one isn't too hard to implement: Take a look at the source,
> around this 
> line:http://dev.jquery.com/browser/trunk/plugins/autocomplete/jquery.autoc...
> Thats where the list is created and where you'd need to check its
> height and page position, and set a custom position relative to the
> input.
>
> I'm not sure about the first one. The autocomplete reacts to the
> keydown event 
> (http://dev.jquery.com/browser/trunk/plugins/autocomplete/jquery.autoc...),
> so if you need to override it: Bind a keypress event before the
> autocomplete and prevent bubbling in case of a paste event - maybe
> that isn't even necessary, as long as you change the content of the
> field before the autocomplete-event-handler sees it.
>
> Regards
> Jörn
>
> On Sat, May 17, 2008 at 12:33 AM, rolfsf <[EMAIL PROTECTED]> wrote:
>
> > One of our developers was working with the jquery Autocomplete plugin
> > and asked about a couple things that I don't know of:
>
> > Is there a way to hook into the event that sets the value of the
> > textbox?
> > Basically what I need to do is override the method that sets the
> > textbox value with one of our own that calls our copy/paste setValue
> > method so the autocomplete plays nicely with copy/paste.
>
> > Also, is there a way to detect the bottom of the screen and reposition
> > the list above the textbox?
>
> > Finally ;-) is it possible to have a single, list container called by
> > multiple textboxes? I notice that autocomplete appears to create a new
> > list for each instance. We have multiple autocompletes on the same
> > page that all pull the exact same data. It would be sweet to have a
> > div set up for that purpose on pageload and reuse it, like we do with
> > many of our modal dialogs.
>
> > Thanks as always


[jQuery] Autocomplete - access to events

2008-05-16 Thread rolfsf

One of our developers was working with the jquery Autocomplete plugin
and asked about a couple things that I don't know of:

Is there a way to hook into the event that sets the value of the
textbox?
Basically what I need to do is override the method that sets the
textbox value with one of our own that calls our copy/paste setValue
method so the autocomplete plays nicely with copy/paste.

Also, is there a way to detect the bottom of the screen and reposition
the list above the textbox?

Finally ;-) is it possible to have a single, list container called by
multiple textboxes? I notice that autocomplete appears to create a new
list for each instance. We have multiple autocompletes on the same
page that all pull the exact same data. It would be sweet to have a
div set up for that purpose on pageload and reuse it, like we do with
many of our modal dialogs.

Thanks as always


[jQuery] Autocomplete - is bgiframe required?

2008-05-16 Thread rolfsf

I'm getting a javascript error in Firefox (list.bgiframe is not a
function) with the autocomplete plugin if I don't include bgiframe,
but the documentation seems to imply that bgiframe is optional.

Is bgiframe required?


[jQuery] Re: workaround for IE6 clone(true) bug in jQuery 1.2.2?

2008-05-15 Thread rolfsf

Thanks Karl
You know, I tried a simple clone() and nothing happens in IE - no
error, but no new row either.
My current workaround (that works) is this:

var rowcontents = $('#contractDetails tbody 
tr:last').html();
var row = ("" + rowcontents + "");
$(row).appendTo('#contractDetails tbody');

not as pretty, but it works well enough for my mockup



On May 15, 12:26 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> Hi Rolf,
>
> If you're already using livequery, do you even need to use  
> clone(true)? Wouldn't simple clone() do the trick? I thought that the  
> true arg was for cloning the events along with the elements, but  
> that's what livequery does for you. Maybe I'm misunderstanding, though.
>
> --Karl
> _
> Karl Swedbergwww.englishrules.comwww.learningjquery.com
>
> On May 15, 2008, at 3:04 PM, rolfsf wrote:
>
>
>
> > I need to clone a table row, and have run into the IE6 clone(true) bug
> > using jQuery 1.2.2.
> > I can't upgrade to jQuery 1.2.3 just yet, so I'm wondering what the
> > simplest workaround is?
>
> > I simply want to duplicate the last row of a table. I was using the
> > following:
>
> > $('#addRow')
> >                    .livequery('click', function(event) {
>
> >                            var row = $('#contractDetails tbody tr:last');
> >                    $(row).clone(true).insertAfter(row).toggleClass('alt');
> >                    });
>
> > works great in FF, etc. Throws an error in IE6
>
> > Thanks,
> > rolf


[jQuery] workaround for IE6 clone(true) bug in jQuery 1.2.2?

2008-05-15 Thread rolfsf

I need to clone a table row, and have run into the IE6 clone(true) bug
using jQuery 1.2.2.
I can't upgrade to jQuery 1.2.3 just yet, so I'm wondering what the
simplest workaround is?

I simply want to duplicate the last row of a table. I was using the
following:

$('#addRow')
.livequery('click', function(event) {

var row = $('#contractDetails tbody tr:last');
$(row).clone(true).insertAfter(row).toggleClass('alt');
});

works great in FF, etc. Throws an error in IE6

Thanks,
rolf


[jQuery] Re: Superfish - add sfhover to an LI that doesn't contain UL

2008-05-14 Thread rolfsf

I found a way around what I was trying to do, though it would still be
useful to be able to add a hover class to LI's without nested UL's, to
help get past IE6's lack of hover support.

On May 14, 9:38 am, rolfsf <[EMAIL PROTECTED]> wrote:
> The superfish plugin, from what I can tell, only adds the sfHover
> class to LI's that contain a UL. Is there an easy way to have it add
> the sfHover class to LI's that don't contain a UL?


[jQuery] Superfish - add sfhover to an LI that doesn't contain UL

2008-05-14 Thread rolfsf

The superfish plugin, from what I can tell, only adds the sfHover
class to LI's that contain a UL. Is there an easy way to have it add
the sfHover class to LI's that don't contain a UL?


[jQuery] Re: bgiframe & superfish

2008-05-14 Thread rolfsf

I understand... I had just assumed (without thinking!) that the iframe
was wrapped around the ul. I was having some problems in IE that
seemed to be coming from the use of bgiframe. I've since looked
through the entire set of screens and determined that I can probably
get away with not using it (we've got about 70% IE6, unfortunately),
which gets me past the issues for now. Thanks.

On May 14, 12:16 am, "Joel Birch" <[EMAIL PROTECTED]> wrote:
> Yes, that is invalid HTML. It is inserted in that position so that it
> is "behind" the actual ul contents (the li elements). I guess the
> resulting invalid HTML is a consequence we accept in exchange for a
> much-needed fix for the IE bug. That said, bgIframe does not affect
> IE7 or above, so I think it is not something worth worrying about. In
> my opinion, IE6 is so broken that anything goes when it comes to bug
> fixes. As long as the result is that it works like more modern
> browsers, then personally I'm prepared to live with that and look
> ahead to (hopefully) improved versions of IE.
>
> Joel Birch


[jQuery] bgiframe & superfish

2008-05-13 Thread rolfsf

I've been implementing a menu with the superfish menu, and have been
troubleshooting IE (as usual). I'm using the bgiframe plugin as
prescribed in the superfish documentation.

$(document).ready(function(){
$("ul.nav")
.superfish({
animation : { opacity:"show", height:"show" }
})
.find(">li:has(ul)")
.mouseover(function(){
$("ul", this).bgIframe({opacity:false});
})
.find("a")
.focus(function(){
$("ul", 
$(".nav>li:has(ul)")).bgIframe({opacity:false});
});
});

When I use IE's DOM Explorer to look at the menu, I notice that
bgiframe is placing the iframe inside the UL, like this







Isn't that invalid? Shouldn't the iframe be wrapping the UL?

it just doesn't look right - am I crazy?

rolfsf



[jQuery] Re: treeview - async - problems reinitializing tree

2008-05-04 Thread rolfsf

thanks jpmcc!

I was pondering that at the end of the day Friday what if we just
remove() the entire UL?

Seems like an extra step, but if it works that's great news.

rolf

On May 4, 1:11 pm, jpmcc <[EMAIL PROTECTED]> wrote:
> I've just been battling with the very same problem. I tried emptying
> out the  element too, but found the duplicated divs with the side
> effect that sub branches would not open even though valid data had
> been retrieved using the async extension (and the data was sitting in
> the tree but hidden).
>
> I decided to take it one step further and I completely removed the
>  element during the refresh then re-added it in the same location
> with the same starting markup as when the page originally loaded.
> This cleared the problem for me. The treeview now properly reloads.
>
> Hope that helps.
> J.
>
> On May 1, 6:59 pm, rolfsf <[EMAIL PROTECTED]> wrote:
>
> > Our tree will potentially change within the time that someone is using
> > it. In fact, the user will be creating and saving new nodes; Other
> > users will be creating and saving new nodes. Both users need to be
> > able to refresh the tree to see nodes added by themselves and others.
>
> > Theasynctree starts as an empty . We want to return to that
> > initial state when we click a refresh button. A completely clean
> > slate, then reload with the fresh data as if we had just opened it for
> > the first time.
>
> > On May 1, 10:40 am, ripple <[EMAIL PROTECTED]> wrote:
>
> > >   I'm not sure why you write about removing the contents in a ? 
> > > At what point would that beneficial? Your working with the ajax tree, but 
> > > how much ajax interaction are using? Only at onload time?


[jQuery] async treeview - still have problems re-initializing the tree

2008-05-02 Thread rolfsf

We're still having problems implementing a 'refresh' button for a
treeview tree. We need to be able to re-initialize the tree, clearing
out the current version completely, and reloading with data fresh from
the server.

we're clearing out the current tree with:
$('#openExistingTree').empty();

and then re-initializing with
$('#openExistingTree').treeview({ url:
"CalcBldrOpenExisting.ashx" });

Each time we hit 'refresh', we're getting a duplicate set of 'hitarea'
divs

The initial json returned is:
"[{'text': 'Private Drafts','id': 3, 'hasChildren': true},{'text':
'Shared Drafts','id': 4, 'hasChildren': true},{'text': 'Published
Calculations','id': 5, 'hasChildren': true}]"

Any help would be appreciated. I realize my previous posts came out a
bit unreadable...

thanks
rolf


[jQuery] Re: async treeview - Can we have a callback method that is invoked when the return status is not 200?

2008-05-02 Thread rolfsf

Thanks for the tip. I figured there must be some global method


On May 2, 5:21 am, "Jörn Zaefferer" <[EMAIL PROTECTED]>
wrote:
> When the return code is an error, the global ajaxError event is
> triggered. Give that a try.
>
> Jörn


[jQuery] Re: treeview - async - problems reinitializing tree

2008-05-01 Thread rolfsf

Our tree will potentially change within the time that someone is using
it. In fact, the user will be creating and saving new nodes; Other
users will be creating and saving new nodes. Both users need to be
able to refresh the tree to see nodes added by themselves and others.

The async tree starts as an empty . We want to return to that
initial state when we click a refresh button. A completely clean
slate, then reload with the fresh data as if we had just opened it for
the first time.



On May 1, 10:40 am, ripple <[EMAIL PROTECTED]> wrote:

>   I'm not sure why you write about removing the contents in a ? At 
> what point would that beneficial? Your working with the ajax tree, but how 
> much ajax interaction are using? Only at onload time?
>


[jQuery] async treeview - Can we have a callback method that is invoked when the return status is not 200?

2008-05-01 Thread rolfsf

Another request for the Async Treeview - in our application, we have
an automatic session time out after a set period of idle time. After
that timeout, the server will return a "302 Redirect" status. We then
popup a dialog or redirect to the login page.

We need to have a callback method that is invoked when the return
status is not "200 OK"

Is there an easy way to get that?

Thanks,
rolf


[jQuery] Re: treeview - async - problems reinitializing tree

2008-05-01 Thread rolfsf

Thanks ripple.

So are you saying you had to remove and clear the individual elements
and attributes, rather than using empty() or remove() on the UL?

Why wouldn't removing or emptying the contents of the UL do the same
thing?

I guess I'm confused as to what or where (why!) information about the
contents of the UL is being cached if we've reset it to an empty 

rolf


On May 1, 8:13 am, ripple <[EMAIL PROTECTED]> wrote:
> I had to handle this situation over a week ago.
>
>   I just wrote a couple lines to remove all tree attributes from the 
> generated source and then rebuilt the tree.
>
>      $('.sample ul:eq(0)').removeClass('treeview');
>      $('.sample li').removeClass();  
>      $('.sample ul div').remove();
>      $('.sample ul').removeAttr('style');
>
>      $('.sample ul').tree();
>
>   See my working sample 
> here.http://www.2whoa.com/apps/demo/apex-admin/hierarchy.html
>
>   Works great on IE6 and FF. Haven't tested it on a Mac yet.
>
>   I hope that helps.
>


[jQuery] Re: treeview - async - problems reinitializing tree

2008-05-01 Thread rolfsf

sorry, didn't realize how badly the formatting was! Let me try again.

We ran into a problem when trying to set up a refresh button on
an async treeview implementation. Our tree contents will be changing
all the
time. Basically, we need to know how to blow away the contents of the
UL and
then re-insert them. What's happening is that on each click of the
refresh
we're getting an additional set of hitarea divs.

For the refresh button click, currently we're using
$('#openExistingTree').empty();

then to re-initialize:
$('#openExistingTree').treeview({ url: "CalcBldrOpenExisting.ashx" });

after the initial load, the markup looks fine. After clicking
'refresh' once, it looks like this (note duplicate divs):






















Additional notes from our developer:

The initial json returned is:
"[{'text': 'Private Drafts','id': 3, 'hasChildren': true},{'text':
'Shared Drafts','id': 4, 'hasChildren': true},{'text': 'Published
Calculations','id': 5, 'hasChildren': true}]"

Then, when the user clicks on ‘Private Drafts’, I return the
following:

"[{ 'text': 'Matthews test calc Hour, Location, Participant'}]"

After clearing the tree list, I reinitialize and the returned json is
IDENTICAL to that shown above, but the treeview jquery code does not
interpret it the same way.

--

Any help would be appreciated!

Rolf


[jQuery] Re: treeview - async - can we get a loading icon like this?

2008-04-30 Thread rolfsf

Sweet! thanks Jörn
Was there any change to the javascript? It appears that you're just
using a .placeholder class on a span, that gets replaced...?

rolf

On Apr 30, 9:17 am, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:
> rolf m schrieb:> I'm sorry - I didn't mean the graphic specifically, but an 
> option to
> > show a loading graphic while the selected tree branch is loading
>
> > and perhaps it's already there, but it's not obvious to me
>
> I've added support for that, and modified the demo 
> accordingly:http://dev.jquery.com/view/trunk/plugins/treeview/demo/async.html
>
> Jörn


[jQuery] treeview - async - can we get a loading icon like this?

2008-04-29 Thread rolfsf

I included Jörn's treeview in an application mockup, and it's now
being implemented as an async tree menu by one of our .NET developers.
His only request/comment, so far, is "can we get a spinner icon like
this?"

http://developer.yahoo.com/yui/examples/treeview/dynamic_tree.html

click on any expand icon and note the brief loading icon as it first
loads

minor, certainly, but a nice effect. I know Jörn is working on the
async, so I thought I'd ask

Thanks,
rolfsf


[jQuery] jdMenu 1.4 -- selects appear on top of sub menus in IE

2008-04-15 Thread rolfsf

I just noticed that the updated version 1.4 of jdMenu no longer makes
use of the bgiframe plugin to cover the select bug in IE6

What's the most efficient workaround?

do I bind bgiframe to the ul.jdmenu ul.sub?

thanks,
rolfsf


[jQuery] Re: help with regex? converting plain text with line breaks to with s

2008-04-11 Thread rolfsf

Thank Ariel

So the first line creates a variable of all the text,
line 2a puts an initial , and then splits the text at each line
break adding , and finally adding the final 
Line 3 wraps the whole thing in an  (so jQuery automagically
closes the tag?)

thanks so much

rolfsf

On Apr 11, 2:57 pm, Ariel Flesler <[EMAIL PROTECTED]> wrote:
> line 1: var text = 'one\ntwo\nthree\nfour';//example
>
> line 2a: var html = '' + text.split(/[\n\r]+/).join('') +
> '';
> or
> line 2b: var html = text.replace(/(.+?)(?:[\n\r]+|$)/g, '$1 li>');
>
> line 3: $('').html( html ).appendTo('body');//example
>
> I advice using 2a.
>
> Cheers
>
> --
> Ariel Fleslerhttp://flesler.blogspot.com
>
> On 11 abr, 16:54, rolfsf <[EMAIL PROTECTED]> wrote:
>
> > It's a bit off topic, perhaps, but using jQuery I want to get the
> > contents of a plain text file, and convert each line to a list item in
> > an ordered list. Being a designer, the regular expression syntax just
> > stumps me... \n\r\???
>
> > Can anyone nudge me in the right direction?
>
> > rolfsf


[jQuery] help with regex? converting plain text with line breaks to with s

2008-04-11 Thread rolfsf

It's a bit off topic, perhaps, but using jQuery I want to get the
contents of a plain text file, and convert each line to a list item in
an ordered list. Being a designer, the regular expression syntax just
stumps me... \n\r\???

Can anyone nudge me in the right direction?

rolfsf


[jQuery] Re: Using Jquery instance in an Iframe

2008-04-10 Thread rolfsf

There was a plugin that someone developed for this sort of situation,
but I'm not sure it's still being supported/updated. Look for a jQuery
plugin called FrameReady

rolfsf

On Apr 10, 5:51 am, Frederic <[EMAIL PROTECTED]> wrote:
> Hello,
> To avoid the loading of multiple Jquery in my application using
> Iframe, I would know if anybody has succeeded in using a single Jquery
> instance (in the same domain name).
>
> Any idea on a solution ?
> regards
> Frederic


[jQuery] designMode - how to detect changes in the editable iframe

2008-04-07 Thread rolfsf

I've been playing with the jquery designMode plugin, and am trying to
find a way to detect when any change or edit has been made within the
designMode-enabled iframe, so that I can add a class to a containing
element (e.g. class="edited"). Even something as simple and imprecise
as adding a click event to the iframe doesn't appear to do anything.
Any suggestions?

thanks
rolfsf


[jQuery] ui.tabs - setting the title attribute of newly added tab

2008-04-04 Thread rolfsf

How do I set the title attribute of the anchor element of a newly
created tab?

In one case, I'm generating the tab label (tab name) and panel ID from
the title attribute of my triggering element (an anchor tab for
simplicity), but I'm truncating tab labels longer than 25 characters.
I want the full (long) label to be available to the user via hover.
Hence, I want to set the title attribute as I'm generating the new
tab... but I don't quite understand how I do that

my basic function is

$('#wrapper > ul.tabs-nav').tabs('add', tabID, tabName);

tabID and tabName are the results of some truncating and cleaning

var fullName is a variable that holds the full text I'd like to use as
a title attribute

any help is much appreciated

rolfsf


[jQuery] Re: Problems with Migration from 1.1.3 to 1.2.3

2008-04-04 Thread rolfsf

I've been working slowly through the same upgrade - I was getting a
similar error, and eventually tracked it down to a jquery plugin that
also needed updating. So, you might want to check for jquery 1.2.x
compatible versions of any plugins you use and see if that helps

rolfsf

On Apr 4, 11:25 am, superJ <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> Since the morning I'm trying to complete this supposedly easy
> migration but for some reason it gives me a migraine %-|. The first
> problem I've encounter was "$ is not a function" when trying to call
> (previously worked with jQuery 1.1.3) function (sample call: $
> ('#element_id').slideUp('fast');). I didn't change nothing but the
> jQuery source to 1.2.3.
>
> Did some online search and could not find anything concrete, just
> this: "This error is almost always due to an incorrect file name/path
> for the core jquery js file in your 

[jQuery] Re: ui.tabs - appending multiple new tabs

2008-04-02 Thread rolfsf

In partial answer to my own question, I wrote this, which seems to
work:

$('#newTab').click(function() {
var $tabs = $('#container > 
ul.tabs-nav').tabs('length');
var tabNum = ($tabs + 1);
var newTabID = ("#" + "newTab_" + tabNum);

$('#container > ul.tabs-nav').tabs('add',
newTabID, 'Tab ' + tabNum);
$(newTabID).append('new tab ' + tabNum + '');

return false;
});

However... if combined with closable tabs, it would not be able to
confirm uniqueness of the ID


On Apr 2, 11:25 am, rolfsf <[EMAIL PROTECTED]> wrote:
> Adding (appending) new tabs in ui.tabs is pretty straightforward, but
> I notice in the example:http://stilbuero.de/jquery/tabs_3/#container-9
>
> that if I append multiple new tabs, they are all given the same ID
> (which won't work well in real life)
>
> Is there an easy way to generate sequential IDs? e.g. #appendedTab_1,
> #appendedTab_2
>
> Also, is it possible to 'append' the *first* tab - in other words, add/
> create a tab to an 'empty' container?
>
> Thanks - this is the first time I've delved into the more advanced
> variations with this plugin
>
> rolfsf


[jQuery] Re: UI Tabs - closable tabs

2008-04-02 Thread rolfsf

Thanks Klaus!

Any chance you could give me a quick explanation of what the different
parts of that script are doing? I'm trying to understand how the
script determines which tab to remove. Doing my best to learn these
concepts!

rolfsf

On Apr 1, 11:42 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
> That demo was outdated due to API changes, I fixed it. Add a tab,
> select it and you'll see a little close button.
>
> --Klaus
>


[jQuery] ui.tabs - appending multiple new tabs

2008-04-02 Thread rolfsf

Adding (appending) new tabs in ui.tabs is pretty straightforward, but
I notice in the example:
http://stilbuero.de/jquery/tabs_3/#container-9

that if I append multiple new tabs, they are all given the same ID
(which won't work well in real life)

Is there an easy way to generate sequential IDs? e.g. #appendedTab_1,
#appendedTab_2


Also, is it possible to 'append' the *first* tab - in other words, add/
create a tab to an 'empty' container?

Thanks - this is the first time I've delved into the more advanced
variations with this plugin

rolfsf


[jQuery] UI Tabs - closable tabs

2008-04-01 Thread rolfsf

I want to add a "close" icon to the UI tabs to allow the user to close
a tab (remove it from the interface)

I've found this page: http://stilbuero.de/jquery/tabs_3/close.html
which seems like it's supposed to do what I want, however it doesn't
seem to work for me in either FF, IE6 or Safari 3 - I don't see any
"x", or anything else to click that closes the tabs.

Is there a working model of this concept somewhere?

thanks,
Rolf


[jQuery] Re: Dynamically generated HTML and effects on CSS

2008-03-08 Thread rolfsf


Ah - sorry. I generally don't have a problem with css in dynamically
generated html, though you might encounter problems within iframes. 

and, though I have no clue if these are helpful...:

Tips For Representing Right-To-Left Text In Markup Languages

Set the overall document direction on the HTML element, not the BODY
element.
Use character encodings that employ logical not visual ordering, such as
Unicode, Windows-1255, Windows-1256, ISO-8859-6-i, ISO 8859-8-i. 
Don't use the visually ordered: ISO 8859-6, ISO 8859-8, ISO-8859-6-e,
ISO-8859-8-e. See RFC 1555.


[EMAIL PROTECTED] wrote:
> 
> 
> Yes, i meant dir for html tags, direction for css respectively. Thanks
> for the response anyway.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Dynamically-generated-HTML-and-effects-on-CSS-tp15835622s27240p15916586.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Dynamically generated HTML and effects on CSS

2008-03-06 Thread rolfsf


I've never played with the css direction properties, nor facebox, nor can I
see your example, but I do know that the correct css syntax is:

div {
direction: rtl
}

rather than 'dir', so you might look at that

rolf



[EMAIL PROTECTED] wrote:
> 
> 
> still can't seem to locate the problem... anyone?
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Dynamically-generated-HTML-and-effects-on-CSS-tp15835622s27240p15876780.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: techniques for displaying line numbers

2008-03-03 Thread rolfsf


In looking for ideas, I discovered the 
http://plugins.jquery.com/project/designMode designMode plugin , which
facilitates cross browser use of the designMode feature. Using this
approach, I loaded a page with simple ordered list into an iframe. With
designMode turned on, I can add lines and line items. 

It's not exactly what I was looking for, but it's a step in that direction.
I would love to hear other ideas!

r.


rolfsf wrote:
> 
> I'm trying to sketch out a concept for an application that is essentially
> a simple text editor or equation editor. A user will type or paste some
> text ( a calculation of sorts) into a text area.
> 
> Is there a way, perhaps using jquery, to display the line numbers along
> side the text or text-area? Is there a way to render the text area as an
> ordered list on the fly, while still allowing editing?
> 
> Just looking for ideas from anyone who may have encountered this
> 
> thanks
> Rolf
> 

-- 
View this message in context: 
http://www.nabble.com/techniques-for-displaying-line-numbers-tp15812042s27240p15818436.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] techniques for displaying line numbers

2008-03-03 Thread rolfsf


I'm trying to sketch out a concept for an application that is essentially a
simple text editor or equation editor. A user will type or paste some text (
a calculation of sorts) into a text area.

Is there a way, perhaps using jquery, to display the line numbers along side
the text or text-area? Is there a way to render the text area as an ordered
list on the fly, while still allowing editing?

Just looking for ideas from anyone who may have encountered this

thanks
Rolf
-- 
View this message in context: 
http://www.nabble.com/techniques-for-displaying-line-numbers-tp15812042s27240p15812042.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: what editor do you use?

2008-02-14 Thread rolfsf


http://www.panic.com/coda/ coda  - but then, I'm one of those mac people...

rolfsf


Feijó-2 wrote:
> 
> I changed my own a few weeks ago, now I'm using Editpad++
> ( http://sourceforge.net/projects/notepad-plus/ ) 
> its freeware, nice resources, like macros, quick-text, highlighted
> source, ... 
> 
> and yours? 
> 
> -- 
> 
> Feijó
> 

-- 
View this message in context: 
http://www.nabble.com/what-editor-do-you-use--tp15462258s27240p15481839.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: changing the selected option in a select

2008-02-08 Thread rolfsf


Thanks - I'll check it out. I found Sam Collett's selectboxes plugin and used
that, although it does far more than I needed.

r.



Charles K. Clarkson wrote:
> 
> 
> rolfsf wrote:
> 
> : this didn't work (as well as several other variations):
> : $('a.cancel').click( function(){
> : $('select option[value=0]').attr("selected","selected");
> : });
> : 
> : can someone clue me in?
> 
> $('a.cancel').click( function(){
> $('select').val('--');
> });
> 
> 
> 
> HTH,
> 
> Charles K. Clarkson
> -- 
> Mobile Homes Specialist
> Free Market Advocate
> Web Programmer
> 
> 254 968-8328
> 
> http://www.clarksonenergyhomes.com/wordpress/about/
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/changing-the-selected-option-in-a-select-tp15345354s27240p15357275.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] changing the selected option in a select

2008-02-07 Thread rolfsf


I can't seem to get this to work...

I'm using jquery 1.1.4 

I have a link 'a.clear'

When clicking on a.clear, I want to reset all selects to a 'null' option:

javascript:void(0); clear 


  --
  this
  that


this didn't work (as well as several other variations):
$('a.cancel').click( function(){
$('select option[value=0]').attr("selected","selected");
});

can someone clue me in?

Thanks!
-- 
View this message in context: 
http://www.nabble.com/changing-the-selected-option-in-a-select-tp15345354s27240p15345354.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: re[jQuery] placeWith -- Use with Classes

2008-01-25 Thread rolfsf


and when dealing with multiple classes on the same element, I've found it
necessary at times to use:

.attr('class' , 'class-name1 class-name2')

where .class-name1 typically doesn't change, but .class-name2 might be any
one of 5 or 6 different classes. Rather than trying to figure out which one
of the 5 I need to remove, I just set the class to the combination I want.
If that makes any sense... 

rolf 



Karl Swedberg-2 wrote:
> 
> 
> I can't build the whole thing for you because I don't know what is  
> being clicked and which element's class you want changed, but in  
> general you can manipulate classes with .addClass('some-class')  
> and .removeClass('optional-class-name') and .toggleClass('some-class').
> 
> You'll find these methods (and more!) here:
> http://docs.jquery.com/Attributes/
> 
> --Karl
> _
> Karl Swedberg
> www.englishrules.com
> www.learningjquery.com
> 
> 
> 
> On Jan 25, 2008, at 12:23 PM, vanoosterhout wrote:
> 
>>
>> I know this may be a pretty elementary question, but I am trying to
>> figure out how to change a class based on a click.  I think should be
>> able to do this with replaceWith, but for some reason I am struggling.
>>
>> I have this:
>>
>> 1.Boat Select
>> 2.Halyard Length
>> 3.Shackle Select
>>
>> and for example would like to change it to:
>>
>> 1.Boat Select
>> 2.Halyard Length
>> 3.Shackle Select
>>
>>
>> Basically I want to be able to change the class ... and nothing else.
>> If anyone could provide a snippet of sample code I would be very
>> thankful.
>>
>> Thanks,
>>
>> Christopher
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/replaceWithUse-with-Classes-tp15093364s27240p15095040.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: sum of table rows

2008-01-23 Thread rolfsf


Sweet! Thanks man!



Dan G. Switzer, II wrote:
> 
> 
>>I just realized the description text on the page is completely wrong! It's
>>for another plug-in and I used that page as a template for this one. :)
> 
> I just updated the Calculation Plug-in page so that the description is
> accurate. I also updated the examples so they work when the numbers are
> changed (no need to hit the "Calc" buttons.)
> 
> http://www.pengoworks.com/workshop/jquery/calculation.plugin.htm
> 
> -Dan
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/sum-of-table-rows-tp14879031s27240p15053055.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: sum of table rows

2008-01-23 Thread rolfsf


That's a nice little plugin Dan! Is it possible to sum a column of text
inputs as they're filled (self-totalling, rather than onClick)?

Rolf



Dan G. Switzer, II wrote:
> 
> 
> It sounds as if this might be a good candidate for my Calculation plug-in:
> http://www.pengoworks.com/workshop/jquery/calculation.plugin.htm
> 
> $("tr").each(function (){
>   var sum = $("span.length", this).sum();
>   var person = $("td.person").text();
> 
>   alert(person + " = " + sum);
> });
> 
> -Dan
> 
> 

-- 
View this message in context: 
http://www.nabble.com/sum-of-table-rows-tp14879031s27240p15050352.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: help with jframe plugin :)

2008-01-21 Thread rolfsf


I don't know jFrame, and haven't spent much time looking, but according to
the jFrame documentation:


The following JavaScript files must be included in the head section of your
HTML page :

jquery.js : http://docs.jquery.com/Downloading_jQuery
jquery.form.js : http://www.malsup.com/jquery/form/#download
jquery.jframes.js :
http://ftp.pimentech.net/src/pimentech-scripts/scripts/src/js/jquery.jframe.js


You haven't included jquery.form.js in your document. Perhaps start
there...?



Piere wrote:
> 
> 
> http://members.chello.at/stickray/ajax
> 
> i need to call this jframe per javascript, ive wrote my own function
> but isnt working :/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/help-with-jframe-plugin-%3A%29-tp15000569s27240p15001702.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Author of UI-Tabs Plug-in?

2008-01-19 Thread rolfsf


I believe it's Klaus... 

http://www.stilbuero.de/2007/10/23/jquery-ui-tabs-aka-tabs-3/



Rick Faircloth wrote:
> 
> Hi, all.
> 
> Who is the author of the UI/Tabs Plug-in?
> 
> Rick
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Author-of-UI-Tabs-Plug-in--tp14977932s27240p14978202.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Announce: jQuery Expander Plugin

2008-01-13 Thread rolfsf


Very nice Karl, as usual!

It's similar in functionality to the  http://www.reindel.com/truncate/
truncate plugin  that I recently used, but feels more refined.

How about making it easy to use an expand/collapse icon in place of the
text?
-- 
View this message in context: 
http://www.nabble.com/Announce%3A-jQuery-Expander-Plugin-tp14793146s27240p14795531.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Superfish Menus - Including Dynamic Navigation Arrows

2008-01-07 Thread rolfsf


I might be misunderstanding, but the arrows in the example link are not done
with javascript - it's just css (from the linked page):

#menuh a.top_parent, #menuh a.top_parent:hover  /* attaches down-arrow to
all top-parents */
{
background-image: url(navdown_white.gif);
background-position: right center;
background-repeat: no-repeat;
}

#menuh a.parent, #menuh a.parent:hover  /* attaches side-arrow to all
parents */
{
background-image: url(nav_white.gif);
background-position: right center;
background-repeat: no-repeat;
}

Basically, you're just setting a background image for 'parent' LI's. Unless
you're looking for javascript to determine if an LI contains a UL, and then
assign a class?





Robin Rowell wrote:
> 
> 
> Hi all and Joel.
> 
> Is there a version of Superfish that uses jquery generated arrows
> (using dynamically created classes) for submenus that contain further
> content? (this page would be an example:
> http://sperling.com/examples/menuh/
> )
> 
> Thanks!
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Superfish-Menus---Including-Dynamic-Navigation-Arrows-tp14678621s27240p14680109.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: mery christmas!

2007-12-25 Thread rolfsf


Feliz Natal Feijó!

r.



Feijó-2 wrote:
> 
> and great 2008 to ya'll !!
> 
> 
> huge hug
> baita abraço
> Feijó
> 
> 

-- 
View this message in context: 
http://www.nabble.com/mery-christmas%21-tp14492663s27240p14496959.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: clicking on row vs. clicking on link in that row

2007-12-22 Thread rolfsf


Thanks to both of you... when I get back at this later in the week I'm going
to play with the various ideas and read up. I don't understand event
bubbling, but have heard the term enough times that I should dig in a bit.
The good (and bad) side of jquery is that I haven't had to really learn
javascript - I just jumped in. Little by little, with a little help from my
jquery friends :)

r.



Shawn-53 wrote:
> 
> 
> Understood.
> 
> I read the issue to be that when he clicked the link the row was 
> highlighting.  Whereas he wants to do something specific when the on the 
> link click, but highlight the row when the row is clicked.  In which 
> case both click events need to be independant (i.e. end).  The 
> stopPropagation() will do the trick, but I find a simple "return false" 
> is easier for folks to understand.  Especially those who do not really 
> understand or have experience with event bubbling.
> 
> But I think we are both right.  :)
> 
> Shawn
> 
> Erik Beeson wrote:
>> While returning false will stop the event from propagating, it will also 
>> prevent the default action from occurring, which isn't necessarily 
>> desirable. In this case it might not matter, but in general, 
>> event.stopPropagation () is the "right" way to stop the event from 
>> propagating. Returning false does both event.stopPropagation() and 
>> event.preventDefault().
>> 
>> --Erik
>> 
>> 
>> On 12/21/07, * Shawn* <[EMAIL PROTECTED] 
>> <mailto:[EMAIL PROTECTED]>> wrote:
>> 
>> 
>> You probably need to return false from your click handlers
>> 
>>  // highlight rows, load details
>> $("#myTable tr").mouseover(function() {
>> $(this).addClass("over");}).mouseout(function() {
>> $(this).removeClass("over");
>> }).click(function(){
>> $(this).addClass("thisRow").siblings().removeClass("thisRow");
>> var job = $(this).attr('id')
>> var details = (job + '.htm')
>> $("#console").load(details);
>> return false;
>> });
>> 
>> $("#myTable a.ackn").click( function(){
>> $(this).parents('tr').hide();
>>  return false;
>> });
>> 
>> That *should* take care of things for you...
>> 
>> Shawn
>> 
>> rolfsf wrote:
>>  >
>>  > I've set up a simple action when a user clicks on a row in a
>> table.
>>  > (highlight the row, load some details via ajax into a div)
>>  >
>>  > However, in one column of the table I've got a link/button that,
>> when
>>  > clicked, will hide that row. If clicked, I don't want to
>> highlight the row
>>  > or load it's details. How do I distinguish between the two?
>>  >
>>  >
>>  >   // highlight rows, load details
>>  >   $("#myTable tr").mouseover(function() {
>>  >   $(this).addClass("over");}).mouseout(function() {
>>  >   $(this).removeClass("over");
>>  >   }).click(function(){
>>  >  
>> $(this).addClass("thisRow").siblings().removeClass("thisRow");
>>  >   var job = $(this).attr('id')
>>  >   var details = (job + '.htm')
>>  >   $("#console").load(details);
>>  >   });
>>  >
>>  >
>>  >   // hide a row after acknowledgement
>>  >   $("#myTable a.ackn").click( function(){
>>  >   $(this).parents('tr').hide();
>>  >   });
>>  >
>>  > thanks,
>>  > r.
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/clicking-on-row-vs.-clicking-on-link-in-that-row-tp14464501s27240p14475498.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: clicking on row vs. clicking on link in that row

2007-12-21 Thread rolfsf


that looks promising! Thanks Erik



Erik Beeson wrote:
> 
> Maybe try:
> 
>// hide a row after acknowledgement
>$("#myTable a.ackn").click( function(e){
>e.stopPropagation();
>$(this).parents('tr').hide();
>});
> 
> See also:
> http://docs.jquery.com/Events_(Guide)#event.stopPropagation.28__.29
> 
> --Erik
> 
> 
> On 12/21/07, rolfsf <[EMAIL PROTECTED]> wrote:
>>
>>
>>
>> I've set up a simple action when a user clicks on a row in a table.
>> (highlight the row, load some details via ajax into a div)
>>
>> However, in one column of the table I've got a link/button that, when
>> clicked, will hide that row. If clicked, I don't want to highlight the
>> row
>> or load it's details. How do I distinguish between the two?
>>
>>
>> // highlight rows, load details
>> $("#myTable tr").mouseover(function() {
>> $(this).addClass("over");}).mouseout(function() {
>> $(this).removeClass("over");
>> }).click(function(){
>>
>>
>> $(this).addClass("thisRow").siblings().removeClass("thisRow");
>> var job = $(this).attr('id')
>> var details = (job + '.htm')
>> $("#console").load(details);
>> });
>>
>>
>> // hide a row after acknowledgement
>> $("#myTable a.ackn").click( function(){
>> $(this).parents('tr').hide();
>> });
>>
>> thanks,
>> r.
>> --
>> View this message in context:
>> http://www.nabble.com/clicking-on-row-vs.-clicking-on-link-in-that-row-tp14464501s27240p14464501.html
>> Sent from the jQuery General Discussion mailing list archive at
>> Nabble.com
>> .
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/clicking-on-row-vs.-clicking-on-link-in-that-row-tp14464501s27240p14464813.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] clicking on row vs. clicking on link in that row

2007-12-21 Thread rolfsf


I've set up a simple action when a user clicks on a row in a table.
(highlight the row, load some details via ajax into a div)

However, in one column of the table I've got a link/button that, when
clicked, will hide that row. If clicked, I don't want to highlight the row
or load it's details. How do I distinguish between the two?


// highlight rows, load details
$("#myTable tr").mouseover(function() {
$(this).addClass("over");}).mouseout(function() {
$(this).removeClass("over");
}).click(function(){
$(this).addClass("thisRow").siblings().removeClass("thisRow");
var job = $(this).attr('id')
var details = (job + '.htm')
$("#console").load(details);
});


// hide a row after acknowledgement 
$("#myTable a.ackn").click( function(){
$(this).parents('tr').hide();
});

thanks,
r.
-- 
View this message in context: 
http://www.nabble.com/clicking-on-row-vs.-clicking-on-link-in-that-row-tp14464501s27240p14464501.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] using .load to replace div contents

2007-12-18 Thread rolfsf

I'm doing some simple ajax using .load --- clicking on a table row
loads some html from an external file into a div.

My question - do I need to remove the contents of the div (#myWindow)
before loading the new html, or does .load do this?

$('.myTrigger).click(function(){
var wf = $(this).attr('id')
var details = (wf + '.htm')
$("#myWindow").load(details);
});

Click here


some placeholder content
some more placeholder content


thanks!
r.


[jQuery] Re: Fixed table header

2007-12-18 Thread rolfsf


I've had some success playing with this technique:
http://home.tampabay.rr.com/bmerkey/examples/nonscroll-table-header.html

It's not perfect - it currently uses expressions in the css, which could be
pulled out / adapted into an external javascript file. You can turn the
horizontal scrolling on via css. 

It's a useful technique when you need scrolling, but you don't need too many
other grid "special-effects"

r.



Shawn-53 wrote:
> 
> 
> Can anyone point me to a better and/or more reliable way to do this? 
> This is functional enough for now, but isn't perfect.  I'm getting some 
> 1 or 2 pixel offsets due to borders, padding, etc.  I'm not able to fix 
> EVERY place where this may occur in this code.  (I really hate working 
> with ugly complex tables.. :)
> 
> Thanks for any tips - and listening to me vent.. :)
> 
> Shawn
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Fixed-table-header-tp14363303s27240p14404482.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



  1   2   >