[jQuery] Re: Problem with jQuery performance

2008-06-06 Thread DaveG


Just found this jQ fade technique: 
http://jqueryfordesigners.com/image-cross-fade-transition/


DaveG wrote:


I made some minor code and css changes to your template, but still 
didn't manage to get a smooth fade effect, so I'm not sure the issue 
lies there alone.


You might want to check 
http://brainerror.net/scripts/javascript/blendtrans/ -- there is a 
pretty smooth image fade effect that seems to work quite well with large 
images.


 ~ ~ Dave

daveJay wrote:

Upon further investigation, it's the Mac Firefox that's giving me
grief, the performance while still a tad hampered is acceptable. I
guess there's not much I can do about it except hope that things will
improve in the Mac FF3.





[jQuery] Re: Problem with jQuery performance

2008-06-06 Thread DaveG


I made some minor code and css changes to your template, but still 
didn't manage to get a smooth fade effect, so I'm not sure the issue 
lies there alone.


You might want to check 
http://brainerror.net/scripts/javascript/blendtrans/ -- there is a 
pretty smooth image fade effect that seems to work quite well with large 
images.


 ~ ~ Dave

daveJay wrote:

Upon further investigation, it's the Mac Firefox that's giving me
grief, the performance while still a tad hampered is acceptable. I
guess there's not much I can do about it except hope that things will
improve in the Mac FF3.



[jQuery] Re: Get Global CSS Value

2008-06-06 Thread Dave Methvin

> But I want to have a stylesheet that contains my own custom values
> which I read and then assign to my page elements.FYI  If I create a
> CSS class with custom properties and assign to an existing element
> then while I can get valid CSS properties I cannot get the custom
> value (except with IE)

The opposite of valid CSS properties are invalid CSS properties.
Browsers don't have to do anything in particular with invalid CSS or
HTML.  :-)  Plus, it won't validate.

You could use the jQuery Metadata plugin and store your properties in
a script block, for example:


{
  "a1Type": "Date",
  "a1ValidMesg":"Please enter a valid date",
  "Validate":"@@Internal code to be send to server via Ajax@@"
}


http://docs.jquery.com/Plugins/Metadata/metadata#options


[jQuery] Re: Problem with jQuery performance

2008-06-06 Thread Dave Methvin

> Upon further investigation, it's the Mac Firefox that's giving me
> grief, the performance while still a tad hampered is acceptable. I
> guess there's not much I can do about it except hope that things will
> improve in the Mac FF3.

Possibly the unneeded fadeOut of all images, even the ones already
invisible, is causing a problem?

It should be possible to reduce all of those individual #picture_N
click handlers to something like this:

$("#navigation a").click(function () {
$("#image img:visible").fadeOut("fast");
$("#image img."+this.id).fadeIn("fast");
return false;
});

Also, take advantage of chaining and simplify your selectors where
possible. Something like this:

$("#image ul li img").width($(window).width());
$("#image ul li img").height($(window).width() * .67);

can be simplified to this:

$("#image img")
   .width($(window).width())
   .height($(window).width() * .67);



[jQuery] Search plugin?

2008-06-06 Thread Shawn


I'm in the middle of creating a search page for my app that resembles 
something like the custom query capability of Trac.  Before I go t 
far, is anyone aware of a nice simple package/plugin for this sort of 
thing?  I don't recall seeing anything like this on the plugin page 
recently...


The idea is that we have tooo many options on the current search form, 
and they are not all used all the time.  Not to mention we do not have 
ALL possible options on the search form - just the most common.  We want 
to strip this down to the bare minimum, but allow the addition of an 
arbitrary criteria when desired.


Thanks in advance.

Shawn


[jQuery] Re: Get Custom/global CSS Value

2008-06-06 Thread Richard D. Worth
Are you familiar with the metadata plugin? Rather than putting the custom
properties in your stylesheet, you put it in the value of the class
attribute:

http://plugins.jquery.com/project/metadata

Might be worth a look.

- Richard

On Fri, Jun 6, 2008 at 7:12 PM, Thommo <[EMAIL PROTECTED]> wrote:

>
> I know I can get the CSS value for a standard CSS properties
> For instance $('#myelement').css('Width")
>
> But I want to create my own CSS properties
> eg: (Css Entry)
> a1FormDate
> {
> a1Type:Date
> a1Required:True
> }
>
> The problem is that if I try and retrieve this value by the above
> methods I get a null value from Firefox and Opera. IE seems to work OK
>
> It would be good if I could get CSS value without knowing class. The
> only way I have seen to so this is outside of jquery by creating an
> array and manually searching it via document.stylesheets DOM elements.
>
> I am trying to encapsulate application design so that is entirely
> editable by HTML and stylesheets. Any suggestions greatly appreciated.
>
>


[jQuery] Re: Problem with jQuery performance

2008-06-06 Thread daveJay

Upon further investigation, it's the Mac Firefox that's giving me
grief, the performance while still a tad hampered is acceptable. I
guess there's not much I can do about it except hope that things will
improve in the Mac FF3.


[jQuery] How to make a resize window to clients display settings.

2008-06-06 Thread Aaron

Hi I need help how would you grab the cliens display settings and base
of that give them a website in that display setting. Like if I make
about like 5 or 6 different layouts of the same website  for different
display settings and have them use the one that fits with there
display settings.

Basicly I want an easy way to  resize and reposition the elements in
the website based off the clients display settings so the website
basicly would adjust to the clients display setting so they can view
the website like it should be.

I realize this problem when I looked on my website from my computer
that I made the website on which looks great but then I looked at the
website on a laptop and it was horrible the elements were like
randomly position and also The overall layout looked crapy some were
too  too small.

So I want my website viewable by any display settings.

So I need to create a way to  grab the clients display settings and
base off that to reposition and also alter the height and width  so it
would  fit the users screen so they can view my website like how it
should look.


[jQuery] Re: strange bug with IE and .html()

2008-06-06 Thread Shaun

Thanks for the reply
We are trying to grab that html and save it out clean
is there any way of preventing this?

thanks
Shaun

On 6 Jun, 21:46, Ariel Flesler <[EMAIL PROTECTED]> wrote:
> Yes that's the expando. It's added when $.fn.html() calls $.fn.empty()
> and $.fn.empty() calls $.data().
>
> What problem is that causing ?
>
> --
> Ariel Fleslerhttp://flesler.blogspot.com
>
> On 6 jun, 10:32, Shaun <[EMAIL PROTECTED]> wrote:
>
> > When trying to get some html back from part of a document I get jquery
> > attributes included in the html (IE only)
> > has anyone else seen this and how did they fix it short of regex
>
> > eg elements that have events bound to then have  > jquery1234567="1" etc..


[jQuery] jqModal callback

2008-06-06 Thread Jan Limpens
Hello,

I am in the process of writing some scripts that makes use of JqModal (
http://dev.iceburg.net/jquery/jqModal/).
What I have to do is the following:
The web page contains numerous ajax forms that have as their target a modal
div .
If the user clicks on the submit button, the response is inserted in the div
and shown.

Some of the forms contain a hidden select element.
Once the user clicks on one of those forms' submit button, a dialogue is
presented (using the very same div).
It shows the selects contents as a radio list. Once the user has checked a
radio input, the corresponding option in the select is selected and the form
is ajax posted as described before.

(Or could this be done simpler?)

But: the confirm method does not break processing: I override confirm, but
it is simply ignored - the confirmation dialogue blinks only for the
fraction of a second and the form is submitted as if it would not have been
there.

var options = {
target: '#modalWindow',
beforeSubmit: handleOptions,
success: function(){
showModal();
showCartInfo();
}
};

$(function() {
$('form.buyarticle').ajaxForm(options)
});

function showModal(){
return $('#modalWindow').jqmShow();
}

function showModalWithContent(html){
return $('#modalWindow').html(html).jqmShow();
}

function hideModal(){
return $('#modalWindow').html('').jqmHide();
}

function handleOptions(formData, jqForm, options)
{
var currentSelect = $(jqForm).find("select");
if (currentSelect!=null && currentSelect.length > 0)
return confirm(makeSelectMessage(currentSelect),
callback_SelectResult);
else
return true;
}

function confirm(select,callback) {
$(showModalWithContent(makeSelectMessage(select)))
.end()
.find(':submit:visible')
.click(function(){
callback(select);
hideModal();
return false; // to prevent the form from posting (does not
work...)
});
}

function callback_SelectResult(select){
var result = $("#modelWindow :input:checked").eq(0);
select.selectedIndex = result;
}

var currentSelect;

function makeSelectMessage(select)
{
var msg ="Este produto vem com estas
variações:";
msg += "";
msg += "";
var i = 0;
$(select).find("option").each(function(){
msg += "";
msg += "";
msg += $(this).attr("value");
msg += "";
i++;
});
msg += ""
msg += "";
msg += "";
return msg;
}

Anyone with more jq experience can tell me what I am doing wrong?

-- 
Jan
___
[EMAIL PROTECTED]
www.limpens.com
+55 (11) 3082-1087
+55 (11) 3097-8339


[jQuery] Re: Shadow jQUery

2008-06-06 Thread pedramphp

is there any Simple Example of the Shadow that we can Download it and
Compatible with 1.2.6

On May 28, 8:21 pm, "Glen Lipka" <[EMAIL PROTECTED]> wrote:
> The demo doesn't seem to work.  Not sure.
>
> Glen
>
> On Wed, May 28, 2008 at 9:35 AM, owen <[EMAIL PROTECTED]> wrote:
>
> > Is this obsolete?
>
> >http://docs.jquery.com/UI/Shadow
>
> >  -- Owen


[jQuery] Get Custom/global CSS Value

2008-06-06 Thread Thommo

I know I can get the CSS value for a standard CSS properties
For instance $('#myelement').css('Width")

But I want to create my own CSS properties
eg: (Css Entry)
a1FormDate
{
a1Type:Date
a1Required:True
}

The problem is that if I try and retrieve this value by the above
methods I get a null value from Firefox and Opera. IE seems to work OK

It would be good if I could get CSS value without knowing class. The
only way I have seen to so this is outside of jquery by creating an
array and manually searching it via document.stylesheets DOM elements.

I am trying to encapsulate application design so that is entirely
editable by HTML and stylesheets. Any suggestions greatly appreciated.



[jQuery] Re: Gmail Progress Bar

2008-06-06 Thread pedramphp

I checked this Progress Bar Long ago but this is a sample use of it
there is no Server LINK and Fetching data In it and there is no
Process To figure how much data has been download  so what should
we do how did the google Guys did this 

On Jun 6, 8:18 pm, P-Do <[EMAIL PROTECTED]> wrote:
> There is a progress bar jquery plugin (I'm sure there must be more
> too) here:http://digitalbush.com/projects/progress-bar-plugin
>
> On May 24, 6:11 am, [EMAIL PROTECTED] wrote:
>
> > Recently Google Added a Progress bar in gmail .. without any SWF
> > uploader and any Flashes ... And it works in IE and FIrefox ... how
> > could we do the same in jquery and How did they do this...?


[jQuery] Re: Documentation for Version 1.2 (Download)

2008-06-06 Thread Remy Sharp

Hi,

I converted the wiki output to drive my API browser from it, and I'm
in the process of decoupling this from the front end to create a stand
alone engine that will allow you to query the API docs - for uses in
AIR apps, Dashboard widgets, iGoogle widgets, etc.

The current API browser (online only) is: http://remysharp.com/jquery-api/

I'll be posting it up to my blog once the offline engine is ready.

Hope that helped - albeit abit!

Cheers,

Remy.

On Jun 6, 3:00 pm, Sam Collett <[EMAIL PROTECTED]> wrote:
> There is a special page for converting WikiText to 
> XML:http://docs.jquery.com/Special:Wiki2XML
>
> If the Wiki has built in features for converting to XML, perhaps it
> could be leveraged somehow? As DocBook is one of the output formats,
> there are more options for creating documentation.
>
> If MediaWiki is used to power the site (I assume it is), there are
> options for converting to a PDF (so skipping the XML 
> step):http://www.mediawiki.org/wiki/Extension:Pdf_Exporthttp://wiki.enneenne.com/index.php/MediaWiki_PDF_exporthttp://meta.wikimedia.org/wiki/PDF_Export
>
> -Sam
> PS CC-ing to jQuery Documents list as it seems appropriate to do so
>
> On Jun 6, 1:14 pm, "Richard D. Worth" <[EMAIL PROTECTED]> wrote:
>
> > You may want to take a look at this thread:
>
> > Wiki xml 
> > exporterhttp://groups.google.com/group/jquery-dev/browse_thread/thread/d08934...
>
> > It's a few months old, so I don't know how up-to-date any referenced code
> > might be (for converting from mediawiki to xml), but at the very least there
> > are urls listed for accessing the raw documentation from mediawiki.
>
> > - Richard
>
> > On Fri, Jun 6, 2008 at 7:59 AM, gogui <[EMAIL PROTECTED]> wrote:
>
> > > Hello, I am looking for documentation I can download and have
> > > accessible offline. I understand that visualJQuery and JQuery 1.1.2
> > > API Browsers are available for download, however, they are outdated.
> > > Is there and RSS feed for the documentation provided at JQuery.com
> > > itself? (I am willing to port the raw data to an application).
>
> > Thanks


[jQuery] Problem with jQuery performance

2008-06-06 Thread daveJay

Hi all, I'm desperate for a solution to a major performace problem
I've got.

Basically, I'm trying to do something along the lines of what was done
here with Flash: http://karankapoor.com/


I've got the image centering and scaling worked out. The problem is
when I try to do a dissolve between images it hampers the performance
and smoothness of the dissolve. It's the worst in Firefox. It's
horrendous actually, you don't even see the transition and it takes
forever.

Here's the page in question.

http://sandbox.exit42design.com/photography/

Just view the source and you'll see everything I'm doing. The code is
not that complex, it's just what the code is doing that's putting a
strain on the performance.

Maybe I'm overlooking something obvious that's hurting performance, or
maybe this is just too advanced for jQuery to handle, I don't know. I
just know that I don't want to resort to Flash. I hate Flash. Any help
would be appreciated. Thanks.


[jQuery] Re: $. get xml on IE, does not work....

2008-06-06 Thread Ariel Flesler

What about:



{$c}

XML;
?>

--
Ariel Flesler
http://flesler.blogspot.com

On 10 abr, 11:11, Totha <[EMAIL PROTECTED]> wrote:
> Hello guys, Please help.
>
> Belove works well in Firefox an Opera but not in IE.
> In IE nothing is returned...
>
> Client side:
> - appends result to 
>
> $.get('page/dbRead.php', function(xml) {
>  $('#reader').append( $(xml).find('content') );
>
> });
>
> Server side:
> - script produces very simple xml response
>
>  (...)
>
> echo << 
> 
>     {$c}
> 
> XML;
> ?>
>
> That's it.
>
> Any idea, how to make it works? The solution, other than producing
> palin text instead xml?
>
> Cheers,
> totha


[jQuery] Re: possible bug when parsing xml on IE7?

2008-06-06 Thread Ariel Flesler

dataType needs to be 'xml', 'html', 'json', etc. Not the content type.

--
Ariel Flesler
http://flesler.blogspot.com

On 6 jun, 10:30, Mike Alsup <[EMAIL PROTECTED]> wrote:
> > Thanks for your answer Karl, but it doesn't fix it.
> > Apparently somebody has also the same 
> > problem:http://groups.google.com/group/jquery-en/browse_thread/thread/5c00ab5...
>
> Are you acccessing "myURL.do" through a web server or directly off a
> local filesystem?
>
> Here's a sample page that shows it working:
>
> http://malsup.com/jquery/test/jun6.html


[jQuery] Re: strange bug with IE and .html()

2008-06-06 Thread Ariel Flesler

Yes that's the expando. It's added when $.fn.html() calls $.fn.empty()
and $.fn.empty() calls $.data().

What problem is that causing ?

--
Ariel Flesler
http://flesler.blogspot.com

On 6 jun, 10:32, Shaun <[EMAIL PROTECTED]> wrote:
> When trying to get some html back from part of a document I get jquery
> attributes included in the html (IE only)
> has anyone else seen this and how did they fix it short of regex
>
> eg elements that have events bound to then have  jquery1234567="1" etc..


[jQuery] Re: Superfish issue: statusbar URL won't show when hovering second tier links

2008-06-06 Thread Ruud

Hi Joel,

Thanks for your respond.

I did not provide you with information about the situation when this
behaviour occurs:

On windows XP using Firefox 2.0.
Strangly enough when using IE 6 and 7, it does show the url on the
statusbar.

Looks like a crossbrowser issue within jquery?

Anyway, thanks a lot for sharing this excellent jquery plugin!

Ruud.



On 5 jun, 13:38, "Joel Birch" <[EMAIL PROTECTED]> wrote:
> Hi Ruud,
>
> This is interesting. I do see that behaviour in Mac Firefox although
> when you mouseout from a submenu and then back onto it before it
> disappears the status bar then does show the correct link. In Safari
> (also Mac) the problem you does not exist at all. I haven't checked
> what IE does yet. I think this behaviour may be something to do with
> how jQuery's .hover() function works. That's way over my head to fix,
> but maybe this is something that the jQuery team should have a look
> at?
>
> Thanks for pointing this out - sorry I couldn't be of more help.
>
> Joel Birch.


[jQuery] Re: Plotkit Port?

2008-06-06 Thread Rey Bango


Seth,

Try this:

http://code.google.com/p/flot/

Rey

Seth - TA wrote:

I saw this when looking for chart functionality http://www.liquidx.net/plotkit/,
but wasn't sure if anyone was looking to port it, or has? I saw the
Chart plugin, but says 0.1 which says to me that it is pretty far off,
although the demos looked alright. Just wondering.

Seth



[jQuery] Plotkit Port?

2008-06-06 Thread Seth - TA

I saw this when looking for chart functionality http://www.liquidx.net/plotkit/,
but wasn't sure if anyone was looking to port it, or has? I saw the
Chart plugin, but says 0.1 which says to me that it is pretty far off,
although the demos looked alright. Just wondering.

Seth


[jQuery] jQuery Cycle - Custom scrollHorz

2008-06-06 Thread Andrej

Hi, Was hoping that some you of kind folks would enlighten me as to
how to do this with the awesome Cycle plugin. I am using the
scrollHorz fx, and want to have the incoming and outgoing slides
visible within their container...So it would be like a scrolling
gallery. I've played around with some of the cssBefore/cssAfter
options, as well as changing overflow hidden to visible on the
container...but the incoming slide is always covered up but a previous
slide...Any suggestion are appreciated. Thanks!


[jQuery] Re: Expected behaviour of :visible and :hidden?

2008-06-06 Thread Liam Byrne


My understanding is that something "visible" that's inside something 
"hidden" will report that it's visible


Otherwise, if you were to hide the hidden-div-1 and then show it, the 
internal inside-hidden-div would also need to be explicitly re-shown ?


Maybe an inherit might get around this - haven't tried it.

Liam

anastasia wrote:

I'm hoping someone can clarify the expected behaviour of the :visible
and :hidden filters when the parent element is hidden(display: none).
Will these filters consider these invisible-to-the-user elements
visible, or hidden?

For example:
  
This div is inside a hidden div.
  

So will $("#inside-hidden-div:hidden") return the element? My
expectation was that this *would* have returned the element, but it
does not.

There is an old ticket that seems to be related to this issue:
http://dev.jquery.com/ticket/1349

Thanks!
--
anastasia



  




[jQuery] Re: Gmail Progress Bar

2008-06-06 Thread P-Do

There is a progress bar jquery plugin (I'm sure there must be more
too) here: http://digitalbush.com/projects/progress-bar-plugin

On May 24, 6:11 am, [EMAIL PROTECTED] wrote:
> Recently Google Added a Progress bar in gmail .. without any SWF
> uploader and any Flashes ... And it works in IE and FIrefox ... how
> could we do the same in jquery and How did they do this...?


[jQuery] Re: Mouse Event and Title Display

2008-06-06 Thread jasonruyle

Ended up being an easy fix.

Added:


  $(".thumbnail").mouseout (
function onAfter() {
  var activeSlide = $(".activeSlide").attr("title");
  $("h4").html("" + activeSlide + ""); return false;
  });

Only new problem is that on Mac / Safari, it doesn't change the names
at all.  But, every other browser on Mac, Linux, and PC works fine.
Anyone know about that problem?


On Jun 6, 11:14 am, jasonruyle <[EMAIL PROTECTED]> wrote:
> I'm in the processes of creating a gallery with JCycle.  I was given a
> request  to have:
>
> gallery with forward/back arrows.
> small grey box thumbnails for each image.
> title displayed for each image/thumbnail.
> onhover of another non-active thumbnail, the name changes to that,
> onmouse out, it goes back to the name that is present.
>
> I have all these things done BUT onmouse out, changing back to
> original name.
>
> Below is the code:
>
> 
> $(document).ready(function(){
>
> $.fn.cycle.defaults.timeout = 6000;
>
> $(function() {
> // run the code in the markup!
> $('table pre code').not('#skip,#skip2').each(function() {
> eval($(this).text());
> });
>
> $('#portfolio').after('

[jQuery] Re: click function doesn't work on dynamic content?

2008-06-06 Thread Ariel Flesler

That article in the FAQ does mention LiveQuery.

--
Ariel Flesler
http://flesler.blogspot.com

On 6 jun, 05:56, Jon Reed <[EMAIL PROTECTED]> wrote:
> Might be worth looking into the livequery plugin too
>
> J
>
> On Jun 6, 1:43 am, "Richard D. Worth" <[EMAIL PROTECTED]> wrote:
>
>
>
> > Take a look at:
>
> >http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_st...
>
> > If I've understood you're problem, it's a fairly common one that stems from
> > the fact that you're adding a new element (with append(' ...) that has
> > no click event bound to it. The article linked above has a full explanation
> > and some good solutions.
>
> > - Richard
>
> > Richard D. Worthhttp://rdworth.org/
>
> > On Thu, Jun 5, 2008 at 7:31 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> > wrote:
>
> > > Hi there,
>
> > > Please see my example here:http://www.hellobenlau.net/jquery/test.htm
>
> > > So basically, I want to select a list item from Group A, and when the
> > > transfer button is clicked, it gets transfered to Group B.
> > > However, once transferred, the list items in Group B doesn't respond
> > > to any click function called OUTSIDE of the 'transfer' function.
>
> > > I"m not sure if i'm explaining it properly, but this is my code:
> > > $(document).ready(function(){
>
> > >                var temp;
>
> > >                // selecting
> > >                $('li').click(function(){
> > >                        $('li.highlight').removeClass('highlight');
> > >                        $(this).addClass('highlight');
> > >                        temp = $(this).text();
> > >                });
>
> > >                // when transfer link is clicked
> > >                $('#transfer').click(function(){
> > >                        $('#groupA li.highlight').remove();
> > >                        $('#groupB').append('' + temp + '');
> > >                });
> > >        });
>
> > > Any help would be extremely helpful!
>
> > > Thanks!!- Ocultar texto de la cita -
>
> - Mostrar texto de la cita -


[jQuery] Expected behaviour of :visible and :hidden?

2008-06-06 Thread anastasia

I'm hoping someone can clarify the expected behaviour of the :visible
and :hidden filters when the parent element is hidden(display: none).
Will these filters consider these invisible-to-the-user elements
visible, or hidden?

For example:
  
This div is inside a hidden div.
  

So will $("#inside-hidden-div:hidden") return the element? My
expectation was that this *would* have returned the element, but it
does not.

There is an old ticket that seems to be related to this issue:
http://dev.jquery.com/ticket/1349

Thanks!
--
anastasia




[jQuery] Re: JqModal

2008-06-06 Thread highjo


Hello!guys! this time i waited more than tow days for a little help.i've
trying to figure out how to do it with the belief that i would get helped.A
part from the unanswerd post i'll like to ask if it possible to make a modal
window popup wihout a mouse click like on load and especially if in a
already existing php file where i need to display the result of a function
after the execution of that function.
Please i need to step out and start enjoy the fact to be able to use jquery
to create cool stuff.that' why i'm part of this forum
-- 
View this message in context: 
http://www.nabble.com/JqModal-tp17601317s27240p17695946.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Mouse Event and Title Display

2008-06-06 Thread jasonruyle

I'm in the processes of creating a gallery with JCycle.  I was given a
request  to have:

gallery with forward/back arrows.
small grey box thumbnails for each image.
title displayed for each image/thumbnail.
onhover of another non-active thumbnail, the name changes to that,
onmouse out, it goes back to the name that is present.

I have all these things done BUT onmouse out, changing back to
original name.

Below is the code:




$(document).ready(function(){

$.fn.cycle.defaults.timeout = 6000;

$(function() {
// run the code in the markup!
$('table pre code').not('#skip,#skip2').each(function() {
eval($(this).text());
});

$('#portfolio').after('

[jQuery] Re: insert td before previous td

2008-06-06 Thread Karl Swedberg


In that case, try this...

$('table tr').each(function() {
  $('td:nth-child(4)', this).insertBefore($('td:nth-child(2)', this));
});

--Karl

Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Jun 6, 2008, at 11:18 AM, Javier Martínez wrote:



Richard D. Worth escribió:

$("table td:eq(3)").insertBefore($("table td:eq(1)"));

- Richard

On Fri, Jun 6, 2008 at 10:57 AM, Javier Martínez  
<[EMAIL PROTECTED]

> wrote:


   There is some "short code" way to insert the fourth td of a table
   before
   the second td?

   Thanks



Yes, but I want the same extended to all table's trs. Is it posible?




[jQuery] Re: insert td before previous td

2008-06-06 Thread Javier Martínez

Richard D. Worth escribió:
> $("table td:eq(3)").insertBefore($("table td:eq(1)"));
>
> - Richard
>
> On Fri, Jun 6, 2008 at 10:57 AM, Javier Martínez <[EMAIL PROTECTED] 
> > wrote:
>
>
> There is some "short code" way to insert the fourth td of a table
> before
> the second td?
>
> Thanks
>
>
Yes, but I want the same extended to all table's trs. Is it posible?


[jQuery] Re: Superfish help

2008-06-06 Thread jwadenpfuhl

To all who would read this, nevermind. I did read a little closer in
the documentation for Superfish and it mentions the ability for
Superfish to integrate with hoverIntent.js which has the delay on
mouseover functionality...rock on. Thank you Joel Birch(Superfish) and
Brian Cherne(hoverIntent)...you have changed my life.

On Jun 6, 9:56 am, jwadenpfuhl <[EMAIL PROTECTED]> wrote:
> Is there a way to have a delay on the mouseover event for a superfish
> menu?


[jQuery] Re: [validate] Specifying custom highlight/unhighlight methods

2008-06-06 Thread Jörn Zaefferer

The latest release has a bug where unhighlight is called whenever
validating an element, instead of only when the valid-state changed.
This is fixed in the latest revision, please give that a try:
http://dev.jquery.com/view/trunk/plugins/validate/

Let me know if that helps.

Jörn

On Fri, Jun 6, 2008 at 1:35 PM, kapowaz <[EMAIL PROTECTED]> wrote:
>
> I'm trying to specify a couple of custom methods for highlighting/
> unhighlighting valid/invalid fields on my form, but I'm getting some
> strange behaviour, which I'm not sure is due to me misunderstanding
> how these methods are supposed to be implemented, or if it's just
> buggy.
>
> My custom methods look like this:
>
>validateHighlightError = function(element) {
>$(element).parent().addClass('fail');
>};
>
>validateUnhighlightError = function(element) {
>$(element).parent().removeClass('fail');
>};
>
> And then within the declaration of the validate method:
>
>$('form#signupForm').validate({
>highlight: validateHighlightError,
>unhighlight: validateUnhighlightError,
>rules: rulesBasicSignup,
>messages: messagesBasicSignup
>});
>
> (with rules and messages objects also being specified elsewhere;
> they're pretty straightforward though).
>
> Now, what I'd expect to happen is that whenever a field is determined
> to be invalid (initially when the whole form is submitted, but
> subsequently on keystrokes or blur) the containing element to the
> field (in my case, a DL) will either have a class of 'fail' added or
> removed. But this isn't what is happening; in actual fact, the class
> is removed immediately on blur from the field, regardless of whether
> or not it is valid. The behaviour is confusing, since the way I'm
> displaying errors hides the error message itself onblur so as to
> concentrate the user on a single message at a time; basically it makes
> it look like the field is valid, when actually it's not at all (and
> tabbing/clicking back onto it will re-add the error class to the
> containing element, further confusing matters).
>
> The documentation for these two options is somewhat ambiguous:
>
> highlight:
> How to highlight invalid fields. Override to decide which fields and
> how to highlight.
>
> unhighlight:
> Called to revert changes made by option highlight, same arguments as
> highlight.
>
> It doesn't seem clear to me if this means unhighlight is just intended
> to have the opposite effect of highlight, or if it's supposed to be
> called when an element is no longer considered invalid (which is what
> I'd hope for).
>
> Anybody able to shed some light on the matter?
>
> ~B
>


[jQuery] Re: insert td before previous td

2008-06-06 Thread Richard D. Worth
$("table td:eq(3)").insertBefore($("table td:eq(1)"));

- Richard

On Fri, Jun 6, 2008 at 10:57 AM, Javier Martínez <[EMAIL PROTECTED]>
wrote:

>
> There is some "short code" way to insert the fourth td of a table before
> the second td?
>
> Thanks
>


[jQuery] insert td before previous td

2008-06-06 Thread Javier Martínez

There is some "short code" way to insert the fourth td of a table before 
the second td?

Thanks


[jQuery] Re: Tab Mouse Over

2008-06-06 Thread Richard D. Worth
You could do something like this, with .hover (give it a mouseover and
mouseout function):

$(".TabContainer").hover(function() {
  $(".leftcorner, .content, .rightcorner", this).addClass("hover");
}, function() {
  $(".leftcorner, .content, .rightcorner", this).removeClass("hover");
});

but if you have the flexibility with css, it may make more sense to go this
route:

$(".TabContainer").hover(function() {
  $(this).addClass("hover");
},function() {
  $(this).removeClass("hover");
});

and then write a css rules like

.hover .leftcorner { ... }
.hover .content { ... }
.hover .rightcorner { ... }

- Richard

Richard D. Worth
http://rdworth.org/

On Fri, Jun 6, 2008 at 10:18 AM, Donald J Organ IV <[EMAIL PROTECTED]>
wrote:

>
> I have the following:
>
> 
> 
> 
> 
> 
>
> I need to be able to change the classes for leftcorner, content, and
> rightcorner on mouseover of TabContainer?? Any on know of a simple way
> to do this??
>
>
>


[jQuery] Tab Mouse Over

2008-06-06 Thread Donald J Organ IV

I have the following:







I need to be able to change the classes for leftcorner, content, and 
rightcorner on mouseover of TabContainer?? Any on know of a simple way 
to do this??




[jQuery] Superfish help

2008-06-06 Thread jwadenpfuhl

Is there a way to have a delay on the mouseover event for a superfish
menu?


[jQuery] Re: :eq selector broken?

2008-06-06 Thread Javier Martínez

No, nothing in Firebug. And I have tested it again and same error. First 
load OK, refresh WRONG.
Closed Firefox and openend again and the result is the same.(windows 
use :P )

Tested it now with
IE7 -> OK
IE6 -> OK
Safari -> OK
Opera -> doesn't work for me. The table is not visible

Maybe is some error with my internet connection, that is quite slow at 
this moment.


Hilmar Kolbe escribió:
> any errors from firebug? maybe conditional breakpoints in the debugger?
>
> 2008/6/6 Javier Martínez <[EMAIL PROTECTED] 
> >:
>
>
> Hilmar Kolbe escribió:
> > explain "not working"
> >
> > 2008/6/6 Javier Martínez <[EMAIL PROTECTED]
> 
> > >>:
> >
> >
> > Richard D. Worth escribió:
> > > That demo works fine for me. Tested in FF2, IE6, Safari3
> on XP.
> > >
> > > - Richarde
> > >
> > > On Fri, Jun 6, 2008 at 5:54 AM, Javier Martínez
> > <[EMAIL PROTECTED] 
> >
> > > 
>  > >
> > >
> > > Is selector ":eq" working correctly in the last version?
> > > I thought that was broken using it on my project, but
> I see now
> > > that the
> > > demo on http://docs.jquery.com/Selectors/eq#index is not
> > working too.
> > >
> > >
> >
> > I tried to enter on the demo and worked! But now I reload
> the page and
> > is not working again. What can be?
> >
> >
> >
> > PD: I'm browsing with Firefox 2
> >
> >
> There is not a red color in any td :)
>
>



[jQuery] Re: form effect

2008-06-06 Thread Mike Alsup

> I have made a mailform and if the user click on the submit button the
> mailform should first dissapear before post the message. I had tried
> the follow way:
>
> $("form").submit(function () {
>
>                         if ($("#div1").is(":visible")) {
>                                 $("#div1").animate({
>                                         height:'hide',
>                                         opacity:'hide'
>                                 },"slow","easeInOutCirc");
>
>                         };
>
>                 });
>
> But the effect could not work because the form is post the message
> promptly. There has to be a timeout or something like this but I don´t
> know how...:-(


This should work:

$("form").submit(function () {
var form = this;
if ($("#div1").is(":visible")) {
$("#div1").animate({
height: 'hide',
opacity:'hide'
}, "slow", "easeInOutCirc",
function() {
// submit the form manually in animate callback
form.submit();
});
return false; // <-- important
}
});


[jQuery] Re: Documentation for Version 1.2 (Download)

2008-06-06 Thread Sam Collett

There is a special page for converting WikiText to XML:
http://docs.jquery.com/Special:Wiki2XML

If the Wiki has built in features for converting to XML, perhaps it
could be leveraged somehow? As DocBook is one of the output formats,
there are more options for creating documentation.

If MediaWiki is used to power the site (I assume it is), there are
options for converting to a PDF (so skipping the XML step):
http://www.mediawiki.org/wiki/Extension:Pdf_Export
http://wiki.enneenne.com/index.php/MediaWiki_PDF_export
http://meta.wikimedia.org/wiki/PDF_Export


-Sam
PS CC-ing to jQuery Documents list as it seems appropriate to do so

On Jun 6, 1:14 pm, "Richard D. Worth" <[EMAIL PROTECTED]> wrote:
> You may want to take a look at this thread:
>
> Wiki xml 
> exporterhttp://groups.google.com/group/jquery-dev/browse_thread/thread/d08934...
>
> It's a few months old, so I don't know how up-to-date any referenced code
> might be (for converting from mediawiki to xml), but at the very least there
> are urls listed for accessing the raw documentation from mediawiki.
>
> - Richard
>
> On Fri, Jun 6, 2008 at 7:59 AM, gogui <[EMAIL PROTECTED]> wrote:
>
> > Hello, I am looking for documentation I can download and have
> > accessible offline. I understand that visualJQuery and JQuery 1.1.2
> > API Browsers are available for download, however, they are outdated.
> > Is there and RSS feed for the documentation provided at JQuery.com
> > itself? (I am willing to port the raw data to an application).
>
> Thanks


[jQuery] form effect

2008-06-06 Thread Frika

Hello @all,

I have made a mailform and if the user click on the submit button the
mailform should first dissapear before post the message. I had tried
the follow way:

$("form").submit(function () {

if ($("#div1").is(":visible")) {
$("#div1").animate({
height:'hide',
opacity:'hide'
},"slow","easeInOutCirc");

};

});

But the effect could not work because the form is post the message
promptly. There has to be a timeout or something like this but I don´t
know how...:-(
best regard
Frika


[jQuery] strange bug with IE and .html()

2008-06-06 Thread Shaun

When trying to get some html back from part of a document I get jquery
attributes included in the html (IE only)
has anyone else seen this and how did they fix it short of regex

eg elements that have events bound to then have 

[jQuery] Re: :eq selector broken?

2008-06-06 Thread Hilmar Kolbe
any errors from firebug? maybe conditional breakpoints in the debugger?

2008/6/6 Javier Martínez <[EMAIL PROTECTED]>:

>
> Hilmar Kolbe escribió:
> > explain "not working"
> >
> > 2008/6/6 Javier Martínez <[EMAIL PROTECTED]
> > >:
> >
> >
> > Richard D. Worth escribió:
> > > That demo works fine for me. Tested in FF2, IE6, Safari3 on XP.
> > >
> > > - Richarde
> > >
> > > On Fri, Jun 6, 2008 at 5:54 AM, Javier Martínez
> > <[EMAIL PROTECTED] 
> > > >>
> wrote:
> > >
> > >
> > > Is selector ":eq" working correctly in the last version?
> > > I thought that was broken using it on my project, but I see now
> > > that the
> > > demo on http://docs.jquery.com/Selectors/eq#index is not
> > working too.
> > >
> > >
> >
> > I tried to enter on the demo and worked! But now I reload the page
> and
> > is not working again. What can be?
> >
> >
> >
> > PD: I'm browsing with Firefox 2
> >
> >
> There is not a red color in any td :)
>


[jQuery] Re: possible bug when parsing xml on IE7?

2008-06-06 Thread Mike Alsup

> Thanks for your answer Karl, but it doesn't fix it.
> Apparently somebody has also the same 
> problem:http://groups.google.com/group/jquery-en/browse_thread/thread/5c00ab5...
>

Are you acccessing "myURL.do" through a web server or directly off a
local filesystem?

Here's a sample page that shows it working:

http://malsup.com/jquery/test/jun6.html


[jQuery] Re: String Manipulation

2008-06-06 Thread Andy Matthews

Split is built into Javascript itself. Since jQuery merely adds methods, you
can mix and match split() with jQuery code.



andy


-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mike
Sent: Thursday, June 05, 2008 6:50 PM
To: jQuery (English)
Subject: [jQuery] String Manipulation


Is there a good string manipulation library plugin?  Something that might
have .split()




[jQuery] Re: conditional events

2008-06-06 Thread Mike Alsup

> I'm trying to trigger an event only when a condition is met,
>
>         $(document).ready(function() {
>                 $('#leftScroll').click(function() {    
>                                 $('#scrollContent')
>                                 .animate(
>                                         {
>                                                 left: '+=900'
>                                         },
>                                         'slow');
>                         });            
>                 });
>
> I only want '#scrollContent' to move if its position is not 'left: 10'
>
> I've tried using .offset() and .position() both with no luck
>
> if($('#scrollContent').position() != left: 10) { do stuff} else { do nothing
>
> }
>
> I'm familiar with ActionScript conditional principles but I get no results
> when I try here.
>
> any help would be greatly appreciated...

maybe this?

if ( $('#scrollContent').css('left') != 10) ) {
// do stuff
}


[jQuery] Re: :eq selector broken?

2008-06-06 Thread Javier Martínez

Hilmar Kolbe escribió:
> explain "not working"
>
> 2008/6/6 Javier Martínez <[EMAIL PROTECTED] 
> >:
>
>
> Richard D. Worth escribió:
> > That demo works fine for me. Tested in FF2, IE6, Safari3 on XP.
> >
> > - Richarde
> >
> > On Fri, Jun 6, 2008 at 5:54 AM, Javier Martínez
> <[EMAIL PROTECTED] 
> > >> wrote:
> >
> >
> > Is selector ":eq" working correctly in the last version?
> > I thought that was broken using it on my project, but I see now
> > that the
> > demo on http://docs.jquery.com/Selectors/eq#index is not
> working too.
> >
> >
>
> I tried to enter on the demo and worked! But now I reload the page and
> is not working again. What can be?
>
>
>
> PD: I'm browsing with Firefox 2
>
>
There is not a red color in any td :)


[jQuery] Re: possible bug when parsing xml on IE7?

2008-06-06 Thread MacFly!

Thanks for your answer Karl, but it doesn't fix it.
Apparently somebody has also the same problem:
http://groups.google.com/group/jquery-en/browse_thread/thread/5c00ab5683645982/f0d79fa48a074622?hl=en&lnk=gst&q=xml+IE#f0d79fa48a074622


On Jun 6, 2:18 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> Not sure if this is the problem, but it looks like you're missing a
> closing quotation mark for your data value:
>
> data: "&hidden=getValue", // <-- added quotation mark
>
> --Karl
> 
> Karl Swedbergwww.englishrules.comwww.learningjquery.com
>
> On Jun 6, 2008, at 6:57 AM, MacFly! wrote:
>
>
>
> > Hello,
> > First, I use the latest version of JQuery : 1.2.6
> > I try to get elements from xml returned by an ajax call.
> > It's works fine with FF2 but not with IE7.
> > here is my simple code :
>
> > $.ajax({ type: "POST",
> >url: "myURL.do",
> >data: "&hidden=getValue,
> >dataType:"text/xml",
> >success: function(xml)
> >{
> >alert($(xml).find("el").size());
> >},
> >error: function(error){alert("error");}
> >   });
>
> > and my xml returned from the server is :
>
> >  ST_ID > field>TODA
>
> > size = 2 in FF2 and 0 in IE7
> > Don't know where the problem comes from, I try also  with "//el", $
> > ("el",xml).each...but no success.
> > Can someone help me with that?
>
> > Thanks for your help in advance


[jQuery] Re: :eq selector broken?

2008-06-06 Thread Hilmar Kolbe
explain "not working"

2008/6/6 Javier Martínez <[EMAIL PROTECTED]>:

>
> Richard D. Worth escribió:
> > That demo works fine for me. Tested in FF2, IE6, Safari3 on XP.
> >
> > - Richarde
> >
> > On Fri, Jun 6, 2008 at 5:54 AM, Javier Martínez <[EMAIL PROTECTED]
> > > wrote:
> >
> >
> > Is selector ":eq" working correctly in the last version?
> > I thought that was broken using it on my project, but I see now
> > that the
> > demo on http://docs.jquery.com/Selectors/eq#index is not working
> too.
> >
> >
>
> I tried to enter on the demo and worked! But now I reload the page and
> is not working again. What can be?
>
>
>
> PD: I'm browsing with Firefox 2
>


[jQuery] Get Global CSS Value

2008-06-06 Thread Thommo

I've looked everywhere and it should be simple
I know you can get current /actual css value for an element assigned
to class
ie:  via $('myitem).css('cssvalue')

But I want to have a stylesheet that contains my own custom values
which I read and then assign to my page elements.FYI  If I create a
CSS class with custom properties and assign to an existing element
then while I can get valid CSS properties I cannot get the custom
value (except with IE)
eg:

My
{
a1Type: Date;
a1ValidMesg:Please enter a valid date
Validate:@@Internal code to be send to server via Ajax@@
}

How can get these values indepently of the page element.



[jQuery] Re: :eq selector broken?

2008-06-06 Thread Hilmar Kolbe
works on IE8/XP and SeaMonkey 2.0/XP - doesnt work (no table displayed) with
Opera 9.27 and 9.5 on Ubuntu (don't know if it ever did)

2008/6/6 Richard D. Worth <[EMAIL PROTECTED]>:

> That demo works fine for me. Tested in FF2, IE6, Safari3 on XP.
>
> - Richarde
>
>
> On Fri, Jun 6, 2008 at 5:54 AM, Javier Martínez <[EMAIL PROTECTED]>
> wrote:
>
>>
>> Is selector ":eq" working correctly in the last version?
>> I thought that was broken using it on my project, but I see now that the
>> demo on http://docs.jquery.com/Selectors/eq#index is not working too.
>>
>
>


[jQuery] Re: :eq selector broken?

2008-06-06 Thread Javier Martínez

Richard D. Worth escribió:
> That demo works fine for me. Tested in FF2, IE6, Safari3 on XP.
>
> - Richarde
>
> On Fri, Jun 6, 2008 at 5:54 AM, Javier Martínez <[EMAIL PROTECTED] 
> > wrote:
>
>
> Is selector ":eq" working correctly in the last version?
> I thought that was broken using it on my project, but I see now
> that the
> demo on http://docs.jquery.com/Selectors/eq#index is not working too.
>
>

I tried to enter on the demo and worked! But now I reload the page and 
is not working again. What can be?



PD: I'm browsing with Firefox 2


[jQuery] conditional events

2008-06-06 Thread daveyourself


I'm trying to trigger an event only when a condition is met, 

$(document).ready(function() {
$('#leftScroll').click(function() { 
$('#scrollContent')
.animate(
{
left: '+=900'
},
'slow');
}); 
});

I only want '#scrollContent' to move if its position is not 'left: 10'

I've tried using .offset() and .position() both with no luck

if($('#scrollContent').position() != left: 10) { do stuff} else { do nothing
}

I'm familiar with ActionScript conditional principles but I get no results
when I try here.

any help would be greatly appreciated...
-- 
View this message in context: 
http://www.nabble.com/conditional-events-tp17680621s27240p17680621.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Handling errors when ajax returns html

2008-06-06 Thread Mike Alsup

> I have some server-side code that responds to certain ajax requests by
> returning the html of new rows to insert into an existing table. This
> works really well, but I've been thinking about ways to handle
> "errors" on the server side. By "errors" I mean both actual bugs, and
> business rule violations that mean you can't save a record (for
> instance).
>
> Prior ajax apps I've done have returned xml data that gets rendered by
> the client, not html. Each response has both data and status sections,
> and status does nicely for passing back errorCode, errorText, and
> errorDetails.
>
> In my current case, the expected ajax response is pretty specific dom
> content -- a set of table rows, as html. It can't just suddenly be the
> html of a failure alert, or an xml or json data structure, at least
> not with establishing some conventions about how the client can know
> that that's what it is.
>
> If we want to stay in the html-response domain, I was thinking of
> having two classes of non-dom-insert response, indicated by containing
> the response in a div with an agreed-upon css class. So if the
> response starts with , the client should present
> it as an unobtrusive msg to the user (jGrowl etc), instead of doing
> whatever it usually does with these responses. Similarly, if it starts
> with , it should be presented as a blocking,
> in-your-face "dialog".
>
> An alternative would be for the server no to return html in these
> cases, but instead return xml or json with some agreed-upon structure,
> which the client would then package visually. That would standardize
> the structure and appearance of these msgs, instead of relying on
> server-side code to always return similar-looking content (you could
> standardize that on the server side instead), at the cost of encoding
> the info on the server and decoding it on the client, and some
> restriction on the structure of what you could return.
>
> A third alternative, similar to the xml/json strategy, would be for
> the server to deliver error/msg content as http headers, a "parallel
> channel" alongside the expected html. That's super easy to do on the
> server (ColdFusion back end), but so far, I haven't figure out how to
> access the http headers in a jQuery ajax response. (There's a separate
> thread here about this, no responses yet.)
>
> How do you folks generally handle this? Any best practices to follow,
> minefields not to fall into? Anything at all standard in jQuery, or
> the jQuery community?
>
> Thanks.


All of those options are perfectly valid, and of course the best
choice depends on your specific situation.  You can access content
headers directly on the XMLHttpRequest object in your "complete" or
"error" callback methods and it is also available in the global ajax
triggers (ajaxSuccess, ajaxComplete, ajaxError).  For example:

$().ajaxComplete(function(event, xhr, opts) {
alert(xhr.getResponseHeader("content-type"));
});

I'll throw out one more choice as well, Taconite.  Taconite is a
communication model that effectively allows multiple responses to a
single request.  More info here:

http://www.malsup.com/jquery/taconite/

Mike


[jQuery] Re: superfish help

2008-06-06 Thread Joel Birch

Hi Warren,

For those types of menu, I work around this by adding an unnecessary
child to main nav items that otherwise would have none. I use the
extra child to point to the same page as it's parent and also provide
slightly more info in the link text. An example of this can be seen
here:
http://www.strathcona.vic.edu.au/

Hover over "Term dates" or "OSA" to see what I did there.

Joel Birch.


[jQuery] Re: possible bug when parsing xml on IE7?

2008-06-06 Thread Karl Swedberg


Not sure if this is the problem, but it looks like you're missing a  
closing quotation mark for your data value:


data: "&hidden=getValue", // <-- added quotation mark

--Karl

Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Jun 6, 2008, at 6:57 AM, MacFly! wrote:



Hello,
First, I use the latest version of JQuery : 1.2.6
I try to get elements from xml returned by an ajax call.
It's works fine with FF2 but not with IE7.
here is my simple code :

$.ajax({ type: "POST",
url: "myURL.do",
data: "&hidden=getValue,
dataType:"text/xml",
success: function(xml)
{
alert($(xml).find("el").size());
},
error: function(error){alert("error");}
   });

and my xml returned from the server is :

 ST_IDTODA

size = 2 in FF2 and 0 in IE7
Don't know where the problem comes from, I try also  with "//el", $
("el",xml).each...but no success.
Can someone help me with that?

Thanks for your help in advance




[jQuery] Re: Checking for the next element then hiding it.

2008-06-06 Thread Karl Swedberg


Hi Mathew,

It looks like your attempt will hide the next p rather than the h3. A  
filter function is probably your best bet in this situation:


$('h3').filter(function() {return !$(this).next('p'); })

Hope that helps.

--Karl

Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Jun 6, 2008, at 4:25 AM, Mathew wrote:



Hi guys I want to do something like this. I want jQuery to hide the h3
objects when it detects that there are no p objects after it.

My newb attempt:
$('h3').next('p').hide();

But it does not seem to work.

Title
Paragraph
Title
Title
Paragraph

Any suggestions?




[jQuery] Re: Documentation for Version 1.2 (Download)

2008-06-06 Thread Richard D. Worth
You may want to take a look at this thread:

Wiki xml exporter
http://groups.google.com/group/jquery-dev/browse_thread/thread/d08934f3d4ae40

It's a few months old, so I don't know how up-to-date any referenced code
might be (for converting from mediawiki to xml), but at the very least there
are urls listed for accessing the raw documentation from mediawiki.

- Richard

On Fri, Jun 6, 2008 at 7:59 AM, gogui <[EMAIL PROTECTED]> wrote:

>
> Hello, I am looking for documentation I can download and have
> accessible offline. I understand that visualJQuery and JQuery 1.1.2
> API Browsers are available for download, however, they are outdated.
> Is there and RSS feed for the documentation provided at JQuery.com
> itself? (I am willing to port the raw data to an application).
> Thanks
>


[jQuery] Re: :eq selector broken?

2008-06-06 Thread Hilmar Kolbe
What's broken/wrong? Demo seems functional to me

2008/6/6 Javier Martínez <[EMAIL PROTECTED]>:

>
> Is selector ":eq" working correctly in the last version?
> I thought that was broken using it on my project, but I see now that the
> demo on http://docs.jquery.com/Selectors/eq#index is not working too.
>


[jQuery] Handling errors when ajax returns html

2008-06-06 Thread sparkpool

I have some server-side code that responds to certain ajax requests by
returning the html of new rows to insert into an existing table. This
works really well, but I've been thinking about ways to handle
"errors" on the server side. By "errors" I mean both actual bugs, and
business rule violations that mean you can't save a record (for
instance).

Prior ajax apps I've done have returned xml data that gets rendered by
the client, not html. Each response has both data and status sections,
and status does nicely for passing back errorCode, errorText, and
errorDetails.

In my current case, the expected ajax response is pretty specific dom
content -- a set of table rows, as html. It can't just suddenly be the
html of a failure alert, or an xml or json data structure, at least
not with establishing some conventions about how the client can know
that that's what it is.

If we want to stay in the html-response domain, I was thinking of
having two classes of non-dom-insert response, indicated by containing
the response in a div with an agreed-upon css class. So if the
response starts with , the client should present
it as an unobtrusive msg to the user (jGrowl etc), instead of doing
whatever it usually does with these responses. Similarly, if it starts
with , it should be presented as a blocking,
in-your-face "dialog".

An alternative would be for the server no to return html in these
cases, but instead return xml or json with some agreed-upon structure,
which the client would then package visually. That would standardize
the structure and appearance of these msgs, instead of relying on
server-side code to always return similar-looking content (you could
standardize that on the server side instead), at the cost of encoding
the info on the server and decoding it on the client, and some
restriction on the structure of what you could return.

A third alternative, similar to the xml/json strategy, would be for
the server to deliver error/msg content as http headers, a "parallel
channel" alongside the expected html. That's super easy to do on the
server (ColdFusion back end), but so far, I haven't figure out how to
access the http headers in a jQuery ajax response. (There's a separate
thread here about this, no responses yet.)

How do you folks generally handle this? Any best practices to follow,
minefields not to fall into? Anything at all standard in jQuery, or
the jQuery community?

Thanks.


[jQuery] [validate] Specifying custom highlight/unhighlight methods

2008-06-06 Thread kapowaz

I'm trying to specify a couple of custom methods for highlighting/
unhighlighting valid/invalid fields on my form, but I'm getting some
strange behaviour, which I'm not sure is due to me misunderstanding
how these methods are supposed to be implemented, or if it's just
buggy.

My custom methods look like this:

validateHighlightError = function(element) {
$(element).parent().addClass('fail');
};

validateUnhighlightError = function(element) {
$(element).parent().removeClass('fail');
};

And then within the declaration of the validate method:

$('form#signupForm').validate({
highlight: validateHighlightError,
unhighlight: validateUnhighlightError,
rules: rulesBasicSignup,
messages: messagesBasicSignup
});

(with rules and messages objects also being specified elsewhere;
they're pretty straightforward though).

Now, what I'd expect to happen is that whenever a field is determined
to be invalid (initially when the whole form is submitted, but
subsequently on keystrokes or blur) the containing element to the
field (in my case, a DL) will either have a class of 'fail' added or
removed. But this isn't what is happening; in actual fact, the class
is removed immediately on blur from the field, regardless of whether
or not it is valid. The behaviour is confusing, since the way I'm
displaying errors hides the error message itself onblur so as to
concentrate the user on a single message at a time; basically it makes
it look like the field is valid, when actually it's not at all (and
tabbing/clicking back onto it will re-add the error class to the
containing element, further confusing matters).

The documentation for these two options is somewhat ambiguous:

 highlight:
 How to highlight invalid fields. Override to decide which fields and
how to highlight.

 unhighlight:
 Called to revert changes made by option highlight, same arguments as
highlight.

It doesn't seem clear to me if this means unhighlight is just intended
to have the opposite effect of highlight, or if it's supposed to be
called when an element is no longer considered invalid (which is what
I'd hope for).

Anybody able to shed some light on the matter?

~B


[jQuery] Re: [validate] Validating against a combination of fields

2008-06-06 Thread kapowaz

On Jun 5, 5:29 pm, "Jörn Zaefferer" <[EMAIL PROTECTED]>
wrote:
> I've added a short explanation and an example 
> here:http://docs.jquery.com/Plugins/Validation#Validating_multiple_fields_...

Excellent, thanks! I'll give that a go.


[jQuery] Documentation for Version 1.2 (Download)

2008-06-06 Thread gogui

Hello, I am looking for documentation I can download and have
accessible offline. I understand that visualJQuery and JQuery 1.1.2
API Browsers are available for download, however, they are outdated.
Is there and RSS feed for the documentation provided at JQuery.com
itself? (I am willing to port the raw data to an application).
Thanks


[jQuery] Re: :eq selector broken?

2008-06-06 Thread Richard D. Worth
That demo works fine for me. Tested in FF2, IE6, Safari3 on XP.

- Richarde

On Fri, Jun 6, 2008 at 5:54 AM, Javier Martínez <[EMAIL PROTECTED]>
wrote:

>
> Is selector ":eq" working correctly in the last version?
> I thought that was broken using it on my project, but I see now that the
> demo on http://docs.jquery.com/Selectors/eq#index is not working too.
>


[jQuery] Re: overlay floating div

2008-06-06 Thread Richard D. Worth
$("#myDiv").css({ position: 'absolute' });

- Richard

On Fri, Jun 6, 2008 at 2:04 AM, macsig <[EMAIL PROTECTED]> wrote:

>
> Hi guys,
> I'm trying to have a floating div than once triggered it doesn't push
> down the element below but it overlays them. Something between an
> accordion and a lightbox. Until now all my efforts have been useless,
> so do you have something to suggest to me?
>
> Thanks and have a nice day!
>


[jQuery] AJAX request pending after TCP connection closed

2008-06-06 Thread Greg

Hi everybody!
I use jQuery 1.2.6 and I encounter a little issue.

I try to do some COMET (server push), here is an overview of my
code (simplified) :

jQuery.ajax({
 type: "POST",
 url: "request",
 dataType: "json",
 data: myJsonData,
 success:
function(data)
{
// do something
},
 error:
function(XMLHttpRequest, textStatus, errorThrown)
{
// do something
}
  })

Very simple, isn't it?
So after receiving such a request the server part may hold the
connection according to myJsonData. The server will release the
connection when its state changes. It's a simple server push.

But when the connection is open for a long time it will be
automatically closed, I don't know why. This closing is not a problem
for me because the error function (see the code above) will be
called... But it's not the case! After a TCP closing the Ajax function
will still remains in waiting state.

I made some screenshots:
 TCP connection closed:
http://www.gburri.org/bordel/comet/tcp_stream.png
 but AJAX connection still waiting:
http://www.gburri.org/bordel/comet/firebug.png


Does anyone have any idea about this issue?

TIA

/Greg


[jQuery] Re: get Request doesnt work in IE7

2008-06-06 Thread Jan S

Yes there is supposed to be a ";", and no, this does not solve the
problem.
Thanks for the try, though.
Any other suggestions?
As I said, the script has no problems in FF. Just IE7 wont work.

On 5 Jun., 20:32, Carl Von Stetten <[EMAIL PROTECTED]> wrote:
> Don't know if this is the problem, but you're missing a semicolon (;)
> after the end of your $.get function call.
>
> Carl
>
> Jan S wrote:
> > All of a sudden, xmlhttprequests don't work no more in IE7. FF
> > perfect, no problems.
> > Here the simple code:
> >  >www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> > http://www.w3.org/1999/xhtml";>
> > 
> >     some title
> >     
> >      > script>
> >