[jQuery] Re: Linked tabs that slide in and out when hovering over images

2008-11-25 Thread Jack Killpatrick


this might help:

http://www.ihwy.com/labs/demos/Current/image-hover-menu.aspx

- Jack

yaayme wrote:
Hi! 


I'm trying to add a menu of tabs that show and hide as you hover over a div.
I think I have it working, but I also want to allow people to click on the
tabs which will take them to other pages. My tabs show and hide, but I can't
get them to stay displayed so a user can click on a link. Also, I'm going to
have multiple divs like the one in the example. How can I make sure that:

1) hovering on an image brings out the tabs and allows people to click on
them
2) mousing out hides the tabs
3) hovering on another image brings out that images set of tabs and hides
the other tabs for another image if those tabs for that image are showing

Attached is what I have so far. 

Many thanks in advance!! 

Attachment:  http://www.nabble.com/file/p20676375/test.html test.html 
  





[jQuery] Re: get all children and subchildren

2008-11-25 Thread chitgoks

hector, hi. thanks for that, yes, you are right with the find()
function.


[jQuery] Re: [validate] Sending Two Inputs Together to Remote Validation?

2008-11-25 Thread Jörn Zaefferer
Try this:

$().ajaxSend(function(event, XMLHttpRequest, ajaxOptions) {
 $.extend(ajaxOptions.data, {username: $(#Username).val()});
});

This would add the username to each request. Modify as necessary.

Jörn

On Mon, Nov 24, 2008 at 8:07 PM, megageorge [EMAIL PROTECTED] wrote:

 Is it possible to send two of the inputs in a form together to a
 remote validation php script?

 For example, I would like to check whether a person called 'Bob' has
 the email address '[EMAIL PROTECTED]'. The php script would need pieces
 of information from both the name input and the email address input.

 How could I do this?

 Thanks in advance,
 George



[jQuery] Re: The last script on ready function

2008-11-25 Thread Pierre Bellan
Hi,

Put it at the very bottom of your page.
$(document).ready are executed in LILO order.

I think that's the only thing it which always works.

Pierre

Rodney Dangerfield  - I looked up my family tree and found out I was the
sap.

2008/11/25 MarcelloP [EMAIL PROTECTED]


 Hi all!
 Please, I'm in the need to run a script at the very end of a page
 loading. Actually my page runs several script in $(document).ready
 function, so I know that these are queued to run one after the others
 when the page is loaded. But I must run a single script as the last of
 all, how can I do a such things?

 Thanks in advance

 Marcello


[jQuery] Re: table striping performance with livequery

2008-11-25 Thread Carpii

Thanks Brandon, that looks very interesting.
Ive read a lot about event handling in jQuery and there seems to be a
lot of different plugins, so it was hard to decide which one is best
suited.

Is there a time when livequery is more suitable than listen?
Or even a time when I might want to use both plugins simultaneously?

Thanks


[jQuery] Doing Ajax call to a page that requires authentication

2008-11-25 Thread TheBlueSky

Hi everyone,
How can I send login credentials with jQuery Ajax request (get(), post
() or ajax()) when the page I'm requesting is asking for them before
permitting the access.
Note here that I'm not talking here about form-based authentication.
Thanks in advance.


[jQuery] Re: window close

2008-11-25 Thread brian
Is the content of the pop-up (including the close link) an external file?

In any case, why not just give the pop-up div an ID?

On Tue, Nov 25, 2008 at 12:05 AM, Namrata Vagyani
[EMAIL PROTECTED]wrote:

 This is also not working :(

 On Mon, Nov 24, 2008 at 7:51 PM, Isaak Malik [EMAIL PROTECTED] wrote:

 Try:

 $(this).parents('.popup_window_wrapper').hide();


 On Mon, Nov 24, 2008 at 6:08 AM, Debby [EMAIL PROTECTED] wrote:


 Hi all,

 On click of hyperlink, i am cerating one popup which is under one div
 having class but no id.
 On click of  close window hyperlink in the popup i want to hide this
 popup.
 But not able to hide this.
 I tried this, but not working
 $(this).parent('.popup_window_wrapper').css({'display':'none'});

 popup_window_wrapper: Is the class of popup div.

 Please help me.




 --
 Isaak Malik
 Web Developer





[jQuery] Replacing DIV with XML

2008-11-25 Thread Dipi Evil Danger
I´m trying to make an dynamic page with XML values. When the visitor click
on an item it replaces the content. But it is not doing his job. This is the
code:
$('a').click(function() {
var key = $(this).attr('id').charAt(4);
$('a').click(function() {
var key = $(this).attr('id').charAt(4);
 $.ajax({
 type: GET,
 url: ../cms/xmlCinema.php?id=000+key,
 dataType: xml,
 success: function(xml) {

 $(xml).find(filme).each(function(){
var texto =  ;
var album =  ;
 var texto = 'div class=moviesTitle' +
$(this).find('nome').text() + ' (i' + $(this).find('ano').text() +
'/i)/divbr';
 texto = texto + 'div class=moviesPosterimg
id=poster'+key+' name=poster'+key+'
src=../cinema/poster/000'+key+'.jpg width=95/div';
 texto = texto + 'div class=moviesLabelNome
original:/div div class=moviesDatanbsp;' +
$(this).find('nome_original').text() + '/div';
 texto = texto + 'div class=moviesLabelEstréia:/div
div class=moviesDatanbsp;' + $(this).find('data').text() + '/div';
 texto = texto + 'div class=moviesLabelTrilha:/div
div class=moviesDatanbsp;' + $(this).find('trilha').text() + '/div';
 texto = texto + 'div class=moviesLabelGênero:/div
div class=moviesDatanbsp;' + $(this).find('genero').text() + '/div';
 texto = texto + 'div class=moviesLabelPaís de
Origem:/div div class=moviesDatanbsp;' +
$(this).find('pais_de_origem').text() + '/div';
 texto = texto + 'div class=moviesLabelSite:/div div
class=moviesDatanbsp;a href=' + $(this).find('site').text() + '
target=_blank' + $(this).find('site').text() + '/a/div';
 texto = texto + 'div class=moviesLabelDuração:/div
div class=moviesDatanbsp;' + $(this).find('duracao').text() + '
min./div';
 texto = texto + 'div class=moviesLabelDireção:/div
div class=moviesDatanbsp;' + $(this).find('duracao').text() + '
min./div';
 //Sinopse
 texto = texto + 'div class=moviesLabelSinopse:/div
div class=moviesReleasenbsp;' + $(this).find('sinopse').text() +
'/div';
$('div/div')
 .html(texto)
 .replaceAll('#fichaFilme ol');
 }); //close each(
 } //close sucess
 }); //close $.ajax(
$(#fichaFilme).fadeIn(3000);
}); //close click(
If I use appendTo it adds content. If I use replaceAll it only works in
the first time.

Here is the page (working on it):
http://www.ncweb.com.br/PHP/index.php?mod=Cinema

Thanks!

-- 
dipi evil danger
Gott weiß ich will kein Engel sein
http://meadiciona.com/dipi


[jQuery] jQuery Game Attempt

2008-11-25 Thread feenikz

Hi all,
 We've attempted to write a game in jQuery and learnt a lot doing it.
We started with a base of gameQuery (http://gamequery.onaluf.org/)
which makes most of the collisions/sounds etc possible.

http://www.vertigo-project.com/projects/redline-game -- any opinions /
suggestions welcome. One issue we've been having is with performance -
older computers struggle with the scrolling and we get pauses etc -
any performance tips would be welcome!

Thanks
Dave


[jQuery] scope inside callback?

2008-11-25 Thread Jeremy

 Could someone help me figure out how to load the total number
returned in the post request into the total variable of the object?

Currently, the value of this.total remains zero through the script
even though the post returns 12.


$(document).ready(function() {

function ajax_page(statsendpoint) {

  this.total = 0;

this.updtotal = function(response){
this.total=response.totalnum;
}

this.load_pagination = function() {
$.post(this.statsendpoint,{
 rev_usr_user_id_reviewed: 5
   }, this.updtotal,json);
}

}


[jQuery] form field change to hide and show page elements

2008-11-25 Thread athanasiusrc

I am new to jquery and am having a hard time figuring out this
problem.

I want to hide certain table rows containing form fields when a page
loads and only show them when the rel value in a select option equals
the rel value of the table row.

The first part is simple

$(function(){
   $(tr[rel]).hide();

 });

The rest I'm not sure about. I tried this:

$(select).change(function () {
$((tr[rel]).val() == (select).val()).(tr[rel]).show();
});

but nothing happened when the select fields were changed.

The other thing that I need to do is check the value of the select
fields (there are two) when the page loads and make sure that any
matching tr tags display.


[jQuery] Re: ANN: Books-a-million.com using jQuery

2008-11-25 Thread [EMAIL PROTECTED]

top site?
1Mb homepage downloadjq and proto...hmmm
Am I missing something?

On Nov 25, 4:37 am, Andy Matthews [EMAIL PROTECTED] wrote:
 I used to work for the web company who developed the original BAM
 site, and now a friend of mine is project manager for them. They just
 released a new version of their website and it uses jQuery:

 http://www.booksamillion.com/

 From the source, it looks like they're really only making use of an
 accordion plugin, but hey...another notch in the belt of jQuery.


[jQuery] Re: Pulling images dynamically from a folder.

2008-11-25 Thread TheBlueSky

As per my understanding, you want jQuery to read a folder on your
server and extract all the images there, right? If so, I don't think
it's possible. jQuery is client-side scripting platform (JavaScript)
and it runs on your browser not your server.
Yes, you may integrate it with serer-side script (written in ASP.Net,
JSP, PHP ... etc.) to do what you want.

On Nov 25, 5:51 am, fr0st003 [EMAIL PROTECTED] wrote:
 Here is the page I am working on, I am relatively new to jquery and
 javascript in general.

 http://johntbrown.com/sandbox/lopano/work.html

 What I would like to do is to pull images dynamically from a folder to
 generate the back ground for the page. Then for the forward/backward buttons
 I would like to be able to scan through the folder, also I would like to
 have some sort of tool tip showing a preview of the next image when you put
 your cursor over the forward/backward buttons.

 --
 View this message in 
 context:http://www.nabble.com/Pulling-images-dynamically-from-a-folder.-tp206...
 Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] IE7: loading XML per ajax

2008-11-25 Thread w-o-m

Hello,

I tried to load a .svg vector graphic with $.ajax, which works
perfectly well in FF and Opera, but not in Internet Explorer.

My script looks like this:

$(document).ready(function(){
$.ajax({
type: GET,
url: test.svg,
dataType: xml,
success: function(data){ parseSVG(data); },
error: function(xhr, textStatus, errorThrown){ alert
(textStatus); }
});
});

function parseSVG(svg){
  /* function that parses the DOM of the file */
}

If I run this in IE7, the error function is called. The alert box then
reads parsererror.


The svg-file looks like this (renaming it into .xml makes no
difference):

?xml version=1.0 encoding=UTF-8 standalone=no?
svg
   path
  d=M 167.4375,684.375 L 165.96875,685.71875 z
  id=blablabla
  style=fill:#79b63f;fill-opacity:1; ... /
   path  ...  /
   path  ...  /
/svg

I assume, that IE doesn't like something about the xml, but I don't
know what...


[jQuery] jcarousel extension suggestion

2008-11-25 Thread me me me

I've some pages which have quite a lot of content and the client wants
some kind of loading animation to be displayed while the page loads.
I fiddled around with a few ideas but wasn't very happy with the
results. I realised that it'd be best to just extend jCarousel to
allow it to hide the widget and display a loading image until the
page has entirely loaded. This might be particularly helpful if you're
using jCarousel in conjunction with Thickbox and the content for that
is all inline but hidden.

Please note that this is, so far, just something I've bodged together.
I'm quite sure this can be improved upon.

Anyhoo (this is with v0.2.3, btw) :

var defaults = {
  ...
  loading: null
};

...

this.container.css('display', 'block');
this.buttonNext.css('display', 'block');
this.buttonPrev.css('display', 'block');

/* this code is new
 */
if (this.options.loading != null)
{
var position = this.container.position();

/* Add a div with ID jcarousel_loading to the page which contains
 * the loading animation. The div will be positioned according to the
 * outer jCarousel div. To get it roughly centred vertically, I added
 * half the height of div.jcarousel-container to the position.top.
 *
 * The loading image is centred horizontally inside the div.
 */
$('body').append('div id=jcarousel_loading style=position:
absolute;left:'+position.left+'px;top:'+(position.top + parseInt($
('.jcarousel-container').css('height')) / 2)+'px;z-index:100;width:'+$
('.jcarousel-container').css('width')+'img
src='+this.options.loading+' style=display:block;margin:0 auto; /
/div');

/* Hide the jCarousel widget
 */
$('.jcarousel-container').css('visibility', 'hidden');

/* Set a callback to fire when all images are loaded that
 * will hide the animation and display the widget.
 */
$(window).load(function ()
{
$('#jcarousel_loading').hide();
$('.jcarousel-container').css('visibility', 'visible');
});
}

The new option is set like this:

$(document).ready(function()
{
$('#gallery_thumbs').jcarousel({
...
loading: '/images/loading.gif'
});
});

It could be a lot prettier, I know. And, I'm sure the positioning
could be done more elegantly.

Comments?


[jQuery] Re: table striping performance with livequery

2008-11-25 Thread Ariel Flesler

LiveQuery supports the whole set of selectors, while Listen doesn't.

There's also Intercept, which is sort of in the middle. It uses event
delegation, and supports any selector.
But it also has more overhead than Listen.

IMO, If you can solve your situation with Listen, than go ahead. But
if you need more selectors, or you simply don't want to deal with some
event delegation problems, then go for LiveQuery.

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

On Nov 25, 8:39 am, Carpii [EMAIL PROTECTED] wrote:
 Thanks Brandon, that looks very interesting.
 Ive read a lot about event handling in jQuery and there seems to be a
 lot of different plugins, so it was hard to decide which one is best
 suited.

 Is there a time when livequery is more suitable than listen?
 Or even a time when I might want to use both plugins simultaneously?

 Thanks


[jQuery] Re: Doing Ajax call to a page that requires authentication

2008-11-25 Thread Pierre Bellan
Hi,
If the authentification is form-based, then the login credentials is passed
by GET or POST.
So you just have to add it to your ajax request

see the data option.

$.ajax({
   type: POST,
   url: some.php,
   data: name=Johnlocation=Boston,
   success: function(msg){
 alert( Data Saved:  + msg );
   }
 });


If the authentification is based on .htaccess, you can use username/password
option

Pierre

W. C. Fields  - I cook with wine, sometimes I even add it to the food.

2008/11/25 TheBlueSky [EMAIL PROTECTED]


 Hi everyone,
 How can I send login credentials with jQuery Ajax request (get(), post
 () or ajax()) when the page I'm requesting is asking for them before
 permitting the access.
 Note here that I'm not talking here about form-based authentication.
 Thanks in advance.



[jQuery] Re: ajax post variable error in safari/chrome

2008-11-25 Thread RodrigoPoloDOTcom

WebKit sucks parsing Dynamic XML, I had this problem and I found it
was because Gzip...

The SOLUTION in PHP, add the fallowing code in your PHP code:

header('Content-Type: application/xml');
ob_start('ob_gzhandler');

another problem reasons could be that your dynamic XML is not a real
XML, my advice for tests:

Use Firefox and Firebug
save your dynamic XML in the same dir where is your dyamic one
open both, the dynamic and the saved on firefox
check if the headers look the same

good luck.

On Oct 3, 1:01 pm, pedalpete [EMAIL PROTECTED] wrote:
 I know this is kinda weird, and I can't seem to find where the issue
 is.

 i've been working on a tag cloud for my site hearwhere.com and
 everything works from FF/IE, but safari and chrome won't let me pass a
 multi-word variable into my query.

 You can test it out athttp://zifimusic.com/v3

 The single word genres from the tag cloud work no problem, but the
 multi-words (like 'folk rock') always return 0 results in Safari/
 Chrome but return a number of results in FF/IE.

 I've output the query and copied it from source, and it runs fine, so
 I don't understand how Chrome  Safari could be causing this issue,
 but everything seems to be going in correctly.

 I've left an 'alert' on the passed genre so I can see what is being
 passed, and it all looks good to me.

 ANY ideas on this?
 Super strange (i think).


[jQuery] Re: jQuery XHR problems with safari 3.2

2008-11-25 Thread RodrigoPoloDOTcom

WebKit sucks parsing Dynamic XML, I had this problem and I found it
was because Gzip...

The SOLUTION in PHP, add the fallowing code in your PHP code:

header('Content-Type: application/xml');
ob_start('ob_gzhandler');

another problem reasons could be that your dynamic XML is not a real
XML, my advice for tests:

Use Firefox and Firebug
save your dynamic XML in the same dir where is your dyamic one
open both, the dynamic and the saved on firefox
check if the headers look the same

good luck.

On Nov 24, 1:23 am, Tony [EMAIL PROTECTED] wrote:
 Hello,
 I do not have mac to test this, but maybe you will find your solution
 here:http://forums.macrumors.com/showthread.php?t=538176

 jqGrid is tested only in Safari for Windows

 Best Regards
 Tony

 On Nov 21, 8:35 pm, Ronnyek [EMAIL PROTECTED] wrote:

  Ok, I've tried a number of grids including flexigrid, andjqgrid, and
  both fail to load via ajax, and json...

  I know things are next to impossible to troubleshoot, but the
  developer menu stuff shows error on line 2699 of jquery-1.2.6.js
  and the error is permission denied.

  Both grids worked flawless in chrome, ie, ff but safari on mac broke.
  Any ideas?




[jQuery] Re: Pulling images dynamically from a folder.

2008-11-25 Thread craig.kaminsky

BlueSky is correct. JavaScript that runs in the browser does not have
access to either a local or server-based file system. For that you
need either: (1) a classic server-side programming language (ala
BlueSky's notes for PHP, ASP.NET, ColdFusion, etc.) or (2) a site that
runs the Jaxer server from Aptana, which is an open-source server
running JavaScript on the server. Outside of those two sets of
options, you would not be able to pull images dynamically from a
folder (or database or XML file, etc.). You can, however, use jQuery
to create the previews as you mentioned...once you get you images
pulled that is!

Do you know what server-side technologies your web host provides? I'm
sure I (or someone on the list :) could offer some assistance in the
type of server-side script you'd need to extract all the files or
images in a directory.


[jQuery] :nthchild, :eq help

2008-11-25 Thread [EMAIL PROTECTED]

Basic Issue:  Can you use a variable in place of the index in
functions like :nthchild() and :eq() and if so, how?

Detailed description:  I'm new to jquery and am trying to create an
image viewer.  I've marked it up and used jquery so that when you
click on a thumbnail image, jquery returns the order of the thumbnail
(1,2,3..) as a variable.  I was hoping that I could use this variable
as the parameter for :nthchild to select the corrisponding image from
a list of images (1,2,3...).  The goal is to be able to return the
corrisponding image's offset and manipulate it.  The thumbnail
variable is returning properly, but I can't seem to select the
corresponding image.  I've noticed that :nthchild() and eq() require
an index.  Does this mean I can't insert a variable there?  Any help
would be appreciated.  I could paste some code, but since this is a
just a pet project, I will probably have to clean it up a bit
first :)  Thanks!

Matt


[jQuery] Using jquery to construct menus like nbc.com

2008-11-25 Thread Ted

I'm trying to utilize jquery to construct a menu structure that is
similar to what you see at fox.com and nbc.com. Basically I have a
menu that is a ul list, with each li selector given it's own id. Below
I have a div container for each menu item, which are set to be hidden
by jquery upon load.

I've been the mousever/mouseout actions to trigger turning each div
container on/off, but the problems I'm encountering with this are 1)
it works when hovering over the main menu selection, but not when the
mouse is inside the div, making selecting sub items difficult/
impossible, and 2) for some reason in IE6/IE7, the divs don't show
when they are over a Flash object.

Does anybody have any ideas on how to take items #1 and #2?

Thanks in advance,
Ted


[jQuery] tabindex for beginners

2008-11-25 Thread gil_yoktan

Hello I finally managed to make jquery work for me. I want to set all
input tabindex to -1 (not selectable by tab key). This is what I
wrote (taken from the source of an example)

script type=text/javascript

$(document).ready(function() {
// set tabs
$(':input').each(function(i, e) {
alert( + this.id + +   TABINDEX=  + $(this).attr
('tabindex') +   );
$(this).attr('tabindex', -1);
alert(TABINDEX AFTER   =  + $(this).attr('tabindex') +
);
})
});
/script

The 1st alert shows me the name of the element and the tabindex
current value
The 2nd alert - shows me TABINDEX AFTER = -1 as I expected and I
as need. But the source of the HTML page is NOT changed - none of the
input tags has a tabindex of -1 !!
I guess I miss something basic... Please give me a hint to redirect me
to the right direction.
Thank you in advance   Gil Yoktan


[jQuery] remove doesn't prevent a request for the image

2008-11-25 Thread Webbes

Hi there,

It is my goal to defer loading of images in the cycle plugin. Which I
have accomplished as follows. But please have a look at the 4th line:
$(
function() {
var imgStack = [];
$('.slideshow  img:gt(2)').remove().each(function()
{ imgStack.push($(this).attr(src)) }).removeAttr(src);
$('.slideshow').cycle({
fx: 'fade',
before: function(curr, next, opts) {
if (opts.addSlide) {
if (opts.imgs.length) {
var slide = new Image();
slide.src = opts.imgs.pop();
opts.addSlide(slide);
}
}
},
imgs: imgStack.reverse()
});
}
);

this will remove all images after the 3th one from the DOM and loads
them one be one only when nececary. As you can see I had to add the
'removeAttr(src)' in line 4.

If I omit this last part the images will be requested from the server
even though I have removed the elements from the DOM. Is this the
correct behavior because it seems a bit silly to me to request images
that are not in the dom anymore. Or am I missing something and using
it completly the wrong way.

I would rather use the makeArray method en cut my jQuery after the
remove() but it gives me the same issue. Allthough the items are not
supposed to be in the DOM the images are still being downloaded...

Thanks,

Wes


[jQuery] tabindex for beginners

2008-11-25 Thread gil_yoktan

Hello I finally managed to make jquery work for me. I want to set all
input tabindex to -1 (not selectable by tab key). This is what I
wrote (taken from the source of an example)

script type=text/javascript

$(document).ready(function() {
// set tabs
$(':input').each(function(i, e) {
alert( + this.id + +   TABINDEX=  + $(this).attr
('tabindex') +   );
$(this).attr('tabindex', -1);
alert(TABINDEX AFTER   =  + $(this).attr('tabindex') +
);
})
});
/script

The 1st alert shows me the name of the element and the tabindex
current value
The 2nd alert - shows me TABINDEX AFTER = -1 as I expected and I
as need. But the source of the HTML page is NOT changed - none of the
input tags has a tabindex of -1 !!
I guess I miss something basic... Please give me a hint to redirect me
to the right direction.
Thank you in advance   Gil Yoktan


[jQuery] MultiSelect Name Problem

2008-11-25 Thread Sai Krishna

Hi,

I'm a newbie to Jquery. I wrote the following function for multi
select
var quantity =0;
$(#parameters).click(function () {
var qty = 0;
$(#parameters option:selected).each(function () {
qty = qty+1;
});
  $(#qty).val(qty);
  return  qty;
})

and the multi select list box with the following code

select name='parameters' id='parameters' multiple='multiple'  
option value='2' value2/option
option value='1' value1/option
option value='3' value3/option
/select

This updates a hidden form variable quantity. Now I changed to name
parameters to parameters[].

The function seems to be not working. Probably I need to length I
tried $(#parameters length()). This seems to be not working. Can
somebody help me?




[jQuery] Re: MultiSelect Name Problem

2008-11-25 Thread MorningZ

You're making it much more complex than it needs to be, besides the
fact that your posted code doesn't make much sense as that return
qty isn't returning the value anywhere

$(#parameters).change(function () {
   var values = $(this).val() || [];
   $(#qty).val(values.length;
})





On Nov 25, 8:49 am, Sai Krishna [EMAIL PROTECTED] wrote:
 Hi,

 I'm a newbie to Jquery. I wrote the following function for multi
 select
 var quantity =0;
 $(#parameters).click(function () {
         var qty = 0;
         $(#parameters option:selected).each(function () {
         qty = qty+1;
         });
   $(#qty).val(qty);
   return  qty;

 })

 and the multi select list box with the following code

 select name='parameters' id='parameters' multiple='multiple'  
 option value='2' value2/option
 option value='1' value1/option
 option value='3' value3/option
 /select

 This updates a hidden form variable quantity. Now I changed to name
 parameters to parameters[].

 The function seems to be not working. Probably I need to length I
 tried $(#parameters length()). This seems to be not working. Can
 somebody help me?


[jQuery] Re: MultiSelect Name Problem

2008-11-25 Thread Sai Krishna

Well that was an edited code. Infact, I was not returning any qty in
my original code. That was mistake.

My Server side code seems to be not taking name parameters. When I
rename the parameters to parameters[], POST seems to get all selected
values other wise I get the last selected value.

$(#parameters).change seems not  getting recognized by Jquery.

On Nov 25, 6:53 pm, MorningZ [EMAIL PROTECTED] wrote:
 You're making it much more complex than it needs to be, besides the
 fact that your posted code doesn't make much sense as that return
 qty isn't returning the value anywhere

 $(#parameters).change(function () {
        var values = $(this).val() || [];
        $(#qty).val(values.length;

 })

 On Nov 25, 8:49 am, Sai Krishna [EMAIL PROTECTED] wrote:

  Hi,

  I'm a newbie to Jquery. I wrote the following function for multi
  select
  var quantity =0;
  $(#parameters).click(function () {
          var qty = 0;
          $(#parameters option:selected).each(function () {
          qty = qty+1;
          });
    $(#qty).val(qty);
    return  qty;

  })

  and the multi select list box with the following code

  select name='parameters' id='parameters' multiple='multiple'  
  option value='2' value2/option
  option value='1' value1/option
  option value='3' value3/option
  /select

  This updates a hidden form variable quantity. Now I changed to name
  parameters to parameters[].

  The function seems to be not working. Probably I need to length I
  tried $(#parameters length()). This seems to be not working. Can
  somebody help me?


[jQuery] Using jquery to construct menus like nbc.com

2008-11-25 Thread serpicolugnut


I'm trying to utilize jquery to construct a menu structure that is 
similar to what you see at fox.com and nbc.com. Basically I have a 
menu that is a ul list, with each li selector given it's own id. Below 
I have a div container for each menu item, which are set to be hidden 
by jquery upon load. 

I've been the mousever/mouseout actions to trigger turning each div 
container on/off, but the problems I'm encountering with this are 1) 
it works when hovering over the main menu selection, but not when the 
mouse is inside the div, making selecting sub items difficult/ 
impossible, and 2) for some reason in IE6/IE7, the divs don't show 
when they are over a Flash object. 

Does anybody have any ideas on how to take items #1 and #2? 
-- 
View this message in context: 
http://www.nabble.com/Using-jquery-to-construct-menus-like-nbc.com-tp20682171s27240p20682171.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: MultiSelect Name Problem

2008-11-25 Thread Sai Krishna

Thank you, the problem is solved. I had to alter the id. I was
dynamically generating the multi select box, I had to rename the ID
which was same as name of select box

On Nov 25, 7:05 pm, Sai Krishna [EMAIL PROTECTED] wrote:
 Well that was an edited code. Infact, I was not returning any qty in
 my original code. That was mistake.

 My Server side code seems to be not taking name parameters. When I
 rename the parameters to parameters[], POST seems to get all selected
 values other wise I get the last selected value.

 $(#parameters).change seems not  getting recognized by Jquery.

 On Nov 25, 6:53 pm, MorningZ [EMAIL PROTECTED] wrote:

  You're making it much more complex than it needs to be, besides the
  fact that your posted code doesn't make much sense as that return
  qty isn't returning the value anywhere

  $(#parameters).change(function () {
         var values = $(this).val() || [];
         $(#qty).val(values.length;

  })

  On Nov 25, 8:49 am, Sai Krishna [EMAIL PROTECTED] wrote:

   Hi,

   I'm a newbie to Jquery. I wrote the following function for multi
   select
   var quantity =0;
   $(#parameters).click(function () {
           var qty = 0;
           $(#parameters option:selected).each(function () {
           qty = qty+1;
           });
     $(#qty).val(qty);
     return  qty;

   })

   and the multi select list box with the following code

   select name='parameters' id='parameters' multiple='multiple'  
   option value='2' value2/option
   option value='1' value1/option
   option value='3' value3/option
   /select

   This updates a hidden form variable quantity. Now I changed to name
   parameters to parameters[].

   The function seems to be not working. Probably I need to length I
   tried $(#parameters length()). This seems to be not working. Can
   somebody help me?


[jQuery] Re: Using jquery to construct menus like nbc.com

2008-11-25 Thread RyOnLife

Have you looked at the Son of Suckerfish method?
http://htmldog.com/articles/suckerfish/dropdowns/

Might be a good starting point to get everything working, then you can
customize the CSS to get whatever look you're going for.



On Nov 25, 10:07 am, serpicolugnut [EMAIL PROTECTED] wrote:
 I'm trying to utilize jquery to construct a menu structure that is
 similar to what you see at fox.com and nbc.com. Basically I have a
 menu that is a ul list, with each li selector given it's own id. Below
 I have a div container for each menu item, which are set to be hidden
 by jquery upon load.

 I've been the mousever/mouseout actions to trigger turning each div
 container on/off, but the problems I'm encountering with this are 1)
 it works when hovering over the main menu selection, but not when the
 mouse is inside the div, making selecting sub items difficult/
 impossible, and 2) for some reason in IE6/IE7, the divs don't show
 when they are over a Flash object.

 Does anybody have any ideas on how to take items #1 and #2?
 --
 View this message in 
 context:http://www.nabble.com/Using-jquery-to-construct-menus-like-nbc.com-tp...
 Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] tabs postback problem

2008-11-25 Thread Jade

Hi all,
i am beginner on jquery framework.I want to use jquery tabs script and
i did.But on my form i click my postback button tabs reloaded.My
button in 3. tab and reloaded 1 after postback

How resolve this problem?


[jQuery] find table rows that contains text

2008-11-25 Thread Sridhar

Hi,

   I am trying to get a reference to a table row that contains an
exact match of a text. But I am getting more than one row. can you
please help me? Following is the html table structure and the jquery
script.
-- html
table
   tr
   tda063/a/td
   /tr
   tr
   tda63/a/td
   /tr
/table

-- script
var rows = $('table tr:contains(' + ' + '63' + ' + ')');

as you can see, both the rows contain text 63. But I want to get the
reference to second row since that contains the exact match. How would
I do that?

Thanks,
sridhar.


[jQuery] MIT or GPL License

2008-11-25 Thread Jason Coudriet
Hello,

 

When using jQuery, do have we have the option to use just the MIT
license?

 

Thanks,

Jason



[jQuery] Re: problem with document ready function

2008-11-25 Thread firstarsbrnwhite

ricardobeat,

thank you very much for your response. This is obviously my first time
working with jquery. I have translated your code to my page with some
unexpected results. When I click on any .menu  ul  li a all the page
does is hide the image in my main gallery which is also ran by jquery.
I don't understand this since nothing in the gallery is a parent
of .menu. See a live example here:

http://www.ryanvosburg.com/portfolio/blackcreek/index.html

I look at your code and it all makes sense to me and should
theoretically work. I even tried a few different variations using
the .toggle command with no luck... :(


[jQuery] Re: Using jquery to construct menus like nbc.com

2008-11-25 Thread Liam Potter


bind a mouseenter function to the menu div, then a mouseleave function 
to the sub menu.


Ted wrote:

I have, and have used the suckerfish method before. The problem is
I've already created the CSS for the menus based upon them living each
in their own div, and would like to engineer them based upon that as
opposed to having to recode the CSS based upon another method.

Basically my HTML looks like this:

div id=nav
ul
li class=main-nava href=# id=main-item-1Main Item 1/a/
li
ul class=sub-nav-1
div id=menu1
!-- 4 col nav menu code goes here --
/div
/ul

li class=main-nava href=# id=main-item-2Main Item 2/a/
li
ul class=sub-nav-2
div id=menu2
!-- 4 col nav menu code goes here --
/div
/ul

li class=main-nava href=# id=main-item-3Main Item 3/a/
li
ul class=sub-nav-3
div id=menu3
!-- 4 col nav menu code goes here --
/div
/ul

li class=main-nava href=# id=main-item-4Main Item 4/a/
li
ul class=sub-nav-4
div id=menu4
!-- 4 col nav menu code goes here --
/div
/ul

li class=main-nava href=# id=main-item-5Main Item 5/a/
li
ul class=sub-nav-5
div id=menu5
!-- 4 col nav menu code goes here --
/div
/ul
/ul
/div

When the user rolls over an item (main-item-#), I want to unhide the
sub-nav-# ul items, and the enclosed child div with it's 4 col menu
layout.

The issue I'm running in to is that using mouseover/mouseout activates
the menu, but when you move your mouse away from the main menu item,
the div disappears. I've tried attaching mouseover/mouseout actions to
the enclosing ul and divs, but those don't seem to register.

On Nov 25, 10:23 am, RyOnLife [EMAIL PROTECTED] wrote:
  

Have you looked at the Son of Suckerfish 
method?http://htmldog.com/articles/suckerfish/dropdowns/

Might be a good starting point to get everything working, then you can
customize the CSS to get whatever look you're going for.

On Nov 25, 10:07 am, serpicolugnut [EMAIL PROTECTED] wrote:





I'm trying to utilize jquery to construct a menu structure that is
similar to what you see at fox.com and nbc.com. Basically I have a
menu that is a ul list, with each li selector given it's own id. Below
I have a div container for each menu item, which are set to be hidden
by jquery upon load.
  
I've been the mousever/mouseout actions to trigger turning each div

container on/off, but the problems I'm encountering with this are 1)
it works when hovering over the main menu selection, but not when the
mouse is inside the div, making selecting sub items difficult/
impossible, and 2) for some reason in IE6/IE7, the divs don't show
when they are over a Flash object.
  
Does anybody have any ideas on how to take items #1 and #2?

--
View this message in 
context:http://www.nabble.com/Using-jquery-to-construct-menus-like-nbc.com-tp...
Sent from the jQuery General Discussion mailing list archive at Nabble.com.
  




[jQuery] Re: Using jquery to construct menus like nbc.com

2008-11-25 Thread Ted

I have, and have used the suckerfish method before. The problem is
I've already created the CSS for the menus based upon them living each
in their own div, and would like to engineer them based upon that as
opposed to having to recode the CSS based upon another method.

Basically my HTML looks like this:

div id=nav
ul
li class=main-nava href=# id=main-item-1Main Item 1/a/
li
ul class=sub-nav-1
div id=menu1
!-- 4 col nav menu code goes here --
/div
/ul

li class=main-nava href=# id=main-item-2Main Item 2/a/
li
ul class=sub-nav-2
div id=menu2
!-- 4 col nav menu code goes here --
/div
/ul

li class=main-nava href=# id=main-item-3Main Item 3/a/
li
ul class=sub-nav-3
div id=menu3
!-- 4 col nav menu code goes here --
/div
/ul

li class=main-nava href=# id=main-item-4Main Item 4/a/
li
ul class=sub-nav-4
div id=menu4
!-- 4 col nav menu code goes here --
/div
/ul

li class=main-nava href=# id=main-item-5Main Item 5/a/
li
ul class=sub-nav-5
div id=menu5
!-- 4 col nav menu code goes here --
/div
/ul
/ul
/div

When the user rolls over an item (main-item-#), I want to unhide the
sub-nav-# ul items, and the enclosed child div with it's 4 col menu
layout.

The issue I'm running in to is that using mouseover/mouseout activates
the menu, but when you move your mouse away from the main menu item,
the div disappears. I've tried attaching mouseover/mouseout actions to
the enclosing ul and divs, but those don't seem to register.

On Nov 25, 10:23 am, RyOnLife [EMAIL PROTECTED] wrote:
 Have you looked at the Son of Suckerfish 
 method?http://htmldog.com/articles/suckerfish/dropdowns/

 Might be a good starting point to get everything working, then you can
 customize the CSS to get whatever look you're going for.

 On Nov 25, 10:07 am, serpicolugnut [EMAIL PROTECTED] wrote:



  I'm trying to utilize jquery to construct a menu structure that is
  similar to what you see at fox.com and nbc.com. Basically I have a
  menu that is a ul list, with each li selector given it's own id. Below
  I have a div container for each menu item, which are set to be hidden
  by jquery upon load.

  I've been the mousever/mouseout actions to trigger turning each div
  container on/off, but the problems I'm encountering with this are 1)
  it works when hovering over the main menu selection, but not when the
  mouse is inside the div, making selecting sub items difficult/
  impossible, and 2) for some reason in IE6/IE7, the divs don't show
  when they are over a Flash object.

  Does anybody have any ideas on how to take items #1 and #2?
  --
  View this message in 
  context:http://www.nabble.com/Using-jquery-to-construct-menus-like-nbc.com-tp...
  Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] Re: The last script on ready function

2008-11-25 Thread ricardobeat

You can also run it on page load (as opposed to DOM ready):

$(window).load(function(){

   // scripts to run after page load here

});

- ricardo

On Nov 25, 8:08 am, Pierre Bellan [EMAIL PROTECTED] wrote:
 Hi,

 Put it at the very bottom of your page.
 $(document).ready are executed in LILO order.

 I think that's the only thing it which always works.

 Pierre

 Rodney Dangerfield  - I looked up my family tree and found out I was the
 sap.

 2008/11/25 MarcelloP [EMAIL PROTECTED]



  Hi all!
  Please, I'm in the need to run a script at the very end of a page
  loading. Actually my page runs several script in $(document).ready
  function, so I know that these are queued to run one after the others
  when the page is loaded. But I must run a single script as the last of
  all, how can I do a such things?

  Thanks in advance

  Marcello


[jQuery] Re: IE7: loading XML per ajax

2008-11-25 Thread ricardobeat

IE7 doesn't support SVG afaik.

On Nov 25, 6:08 am, w-o-m [EMAIL PROTECTED] wrote:
 Hello,

 I tried to load a .svg vector graphic with $.ajax, which works
 perfectly well in FF and Opera, but not in Internet Explorer.

 My script looks like this:

 $(document).ready(function(){
         $.ajax({
             type: GET,
             url: test.svg,
             dataType: xml,
             success: function(data){ parseSVG(data); },
             error: function(xhr, textStatus, errorThrown){ alert
 (textStatus); }
         });

 });

 function parseSVG(svg){
   /* function that parses the DOM of the file */

 }

 If I run this in IE7, the error function is called. The alert box then
 reads parsererror.

 The svg-file looks like this (renaming it into .xml makes no
 difference):

 ?xml version=1.0 encoding=UTF-8 standalone=no?
 svg
        path
                   d=M 167.4375,684.375 L 165.96875,685.71875 z
                   id=blablabla
                   style=fill:#79b63f;fill-opacity:1; ... /
        path  ...  /
        path  ...  /
 /svg

 I assume, that IE doesn't like something about the xml, but I don't
 know what...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
jQuery (English) group.
To post to this group, send email to jquery-en@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-en?hl=en
-~--~~~~--~~--~--~---



[jQuery] Re: Trouble in Table sorter

2008-11-25 Thread hyon

Hi,

I think that's a bug.
The data are generated well in decending order, such as 54, 31, 0, No
data.
But, the order is 0, No data, 31, 54 in acending order.
Am I right?


On Nov 24, 9:51 am, Carpii [EMAIL PROTECTED] wrote:
 On Nov 22, 10:24 am,hyon[EMAIL PROTECTED] wrote:

  Hi,

  When desc sorting, it generated 1.5, 0, and No data~~, but when asc
  order, it generated 0, No Data~~, 1.5.

 It sounds like it is evaluating all types as numerics, and so No
 Data is being interpreted as 0
 Im not familiar with tablesorter, but Im guessing it has a comparison
 function which compares two values.
 You could probably add a little code to make sure they are numerics
 before comparing them, or maybe interpret any non-numerics as -1
 instead of 0?


[jQuery] Re: find table rows that contains text

2008-11-25 Thread Pierre Bellan
Hi,
I think you must use the filter function.
I made this little test :

var mySearch = '63';
$('table tr:contains('+mySearch+')').filter(function(){
if ($.trim($(this).text()) == mySearch ) {
return true;
}
else{
return false;
}
});

The text() method removes all html tags, very useful here. The trim()
function was a jquery addon, very useful too

Pierre

Samuel Goldwyn  - I'm willing to admit that I may not always be right, but
I am never wrong.

2008/11/25 Sridhar [EMAIL PROTECTED]


 Hi,

   I am trying to get a reference to a table row that contains an
 exact match of a text. But I am getting more than one row. can you
 please help me? Following is the html table structure and the jquery
 script.
 -- html
 table
   tr
   tda063/a/td
   /tr
   tr
   tda63/a/td
   /tr
 /table

 -- script
 var rows = $('table tr:contains(' + ' + '63' + ' + ')');

 as you can see, both the rows contain text 63. But I want to get the
 reference to second row since that contains the exact match. How would
 I do that?

 Thanks,
 sridhar.



[jQuery] Re: Pulling images dynamically from a folder.

2008-11-25 Thread fr0st003


So what I could do is use something like PHP, to pull images from the folder
place them into a array, use the math function to pull something at random
then use Javascript to style the information. Would this be possible to do
with Python? I have some experience with Python. And or Ruby?



craig.kaminsky wrote:
 
 
 BlueSky is correct. JavaScript that runs in the browser does not have
 access to either a local or server-based file system. For that you
 need either: (1) a classic server-side programming language (ala
 BlueSky's notes for PHP, ASP.NET, ColdFusion, etc.) or (2) a site that
 runs the Jaxer server from Aptana, which is an open-source server
 running JavaScript on the server. Outside of those two sets of
 options, you would not be able to pull images dynamically from a
 folder (or database or XML file, etc.). You can, however, use jQuery
 to create the previews as you mentioned...once you get you images
 pulled that is!
 
 Do you know what server-side technologies your web host provides? I'm
 sure I (or someone on the list :) could offer some assistance in the
 type of server-side script you'd need to extract all the files or
 images in a directory.
 
 

-- 
View this message in context: 
http://www.nabble.com/Pulling-images-dynamically-from-a-folder.-tp20672755s27240p20684334.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
jQuery (English) group.
To post to this group, send email to jquery-en@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-en?hl=en
-~--~~~~--~~--~--~---



[jQuery] Re: The last script on ready function

2008-11-25 Thread Pierre Bellan
I'm not sure of that.

In the doc of the ready event, it says

Please ensure you have no code in your body onload event handler,
otherwise $(document).ready() may not fire.


Rodney Dangerfield  - I looked up my family tree and found out I was the
sap.

2008/11/25 ricardobeat [EMAIL PROTECTED]


 You can also run it on page load (as opposed to DOM ready):

 $(window).load(function(){

   // scripts to run after page load here

 });

 - ricardo

 On Nov 25, 8:08 am, Pierre Bellan [EMAIL PROTECTED] wrote:
  Hi,
 
  Put it at the very bottom of your page.
  $(document).ready are executed in LILO order.
 
  I think that's the only thing it which always works.
 
  Pierre
 
  Rodney Dangerfield  - I looked up my family tree and found out I was the
  sap.
 
  2008/11/25 MarcelloP [EMAIL PROTECTED]
 
 
 
   Hi all!
   Please, I'm in the need to run a script at the very end of a page
   loading. Actually my page runs several script in $(document).ready
   function, so I know that these are queued to run one after the others
   when the page is loaded. But I must run a single script as the last of
   all, how can I do a such things?
 
   Thanks in advance
 
   Marcello



[jQuery] Re: Pulling images dynamically from a folder.

2008-11-25 Thread Liam Potter


any server side language.

fr0st003 wrote:

So what I could do is use something like PHP, to pull images from the folder
place them into a array, use the math function to pull something at random
then use Javascript to style the information. Would this be possible to do
with Python? I have some experience with Python. And or Ruby?



craig.kaminsky wrote:
  

BlueSky is correct. JavaScript that runs in the browser does not have
access to either a local or server-based file system. For that you
need either: (1) a classic server-side programming language (ala
BlueSky's notes for PHP, ASP.NET, ColdFusion, etc.) or (2) a site that
runs the Jaxer server from Aptana, which is an open-source server
running JavaScript on the server. Outside of those two sets of
options, you would not be able to pull images dynamically from a
folder (or database or XML file, etc.). You can, however, use jQuery
to create the previews as you mentioned...once you get you images
pulled that is!

Do you know what server-side technologies your web host provides? I'm
sure I (or someone on the list :) could offer some assistance in the
type of server-side script you'd need to extract all the files or
images in a directory.





  




[jQuery] Re: Appending text works; appending element doesn't

2008-11-25 Thread ricardobeat

Your code, exactly as it is, works perfectly for me. I didn't include
the tablesorter plugin in my test.

results:

=quack quack= PlaintextSPANElem/SPAN (IE7)
=quack quack
= PlaintextspanElem/span (FF3)

- ricardo

On Nov 25, 1:30 am, Rodent of Unusual Size [EMAIL PROTECTED] wrote:
 I still can't find anything wrong, and someone on the #jquery channel
 confirmed it.

 So does _anyone_ have any idea what's going on here?

 Thanks..


[jQuery] Re: clicking at bottom of long list moves entire page up.

2008-11-25 Thread ricardobeat

Those are not anchors so it's not scrolling because of the click. I
guess the scrolling happens when the content is being replaced, do you
have a test page up somewhere?

On Nov 24, 8:20 pm, tmat [EMAIL PROTECTED] wrote:
 Greetings!
 I'm developing a list of events, and when someone clicks on the name
 of an event, I want the details to  be grabbed from a php page, and
 shown underneath.

 The HTML is this:
 div class='eventName' eid='[the id for the event]' [name of the
 event] /div
 div class='eventDesc' eid='[event id]'/div

 My jQuery is like this:
     $(.eventName).click(function() {
                         var eventID = $(this).attr(eid);
                         $.get(eventinfo.php,{eid:eventID }, function(data) {
                                 $(.eventDesc[eid='+eventID+']).html(data);
                                 
 $(.eventDesc[eid='+eventID+']).slideToggle(500) ;
                         });
                 })

 It does what I want it to do... but when you click on one of the
 bottom events in the list, the page automatically scrolls up to about
 the middle of the page -- and you have scroll back down to the bottom
 to see the info.  It would be rather annoying if this were live.

 Anyone have any ideas how to fix this?  Or any tips?  Thanks very
 much, in advance.
 -Terry


[jQuery] pixelperfect

2008-11-25 Thread weepy

http://www.parkerfox.co.uk/labs/pixelperfect/

Is a bookmarklet that will allow you to drag elements around any page
and informs you of the new coordinates.

Uses jQuery and jQueryUI


[jQuery] Re: :nthchild, :eq help

2008-11-25 Thread ricardobeat

For eq() you can use

$('.images').eq(variable)

nth-child doesn't have it's own function, but you only need to add the
variable to the selector string:

$('.images:nth-child('+variable+')')

- ricardo

On Nov 25, 11:29 am, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 Basic Issue:  Can you use a variable in place of the index in
 functions like :nthchild() and :eq() and if so, how?

 Detailed description:  I'm new to jquery and am trying to create an
 image viewer.  I've marked it up and used jquery so that when you
 click on a thumbnail image, jquery returns the order of the thumbnail
 (1,2,3..) as a variable.  I was hoping that I could use this variable
 as the parameter for :nthchild to select the corrisponding image from
 a list of images (1,2,3...).  The goal is to be able to return the
 corrisponding image's offset and manipulate it.  The thumbnail
 variable is returning properly, but I can't seem to select the
 corresponding image.  I've noticed that :nthchild() and eq() require
 an index.  Does this mean I can't insert a variable there?  Any help
 would be appreciated.  I could paste some code, but since this is a
 just a pet project, I will probably have to clean it up a bit
 first :)  Thanks!

 Matt


[jQuery] Re: pixelperfect

2008-11-25 Thread Eric Martin

Pretty cool - thanks for sharing!

On Nov 25, 8:30 am, weepy [EMAIL PROTECTED] wrote:
 http://www.parkerfox.co.uk/labs/pixelperfect/

 Is a bookmarklet that will allow you to drag elements around any page
 and informs you of the new coordinates.

 Uses jQuery and jQueryUI


[jQuery] Tabs - #Link not working for ajax tab in IE 7

2008-11-25 Thread strummer75

I am having an issue in IE 7 and UI/Tabs as follows:

I am linking directly to a tabs id from another page like so:

http://devapp/contacts/#organizations

My tab link is lia href=/appname/organizations/search/
title=organizationsspanOrganization/span/a/li

I also have a div id in the page that matches the title attribute on
the li - div id=organizations/div

In Firefox the tab is selected and loads the page into the tab when I
hit http://devapp/contacts/#organizations.
In IE 7 the tab is selected but nothing loads... if I click to another
tab and click back the tab gets loaded.

Any ideas?

Thanks,
Tony Covert


[jQuery] Re: scope inside callback?

2008-11-25 Thread ricardobeat

How are you using this constructor? Where are you calling the methods?

On Nov 25, 1:08 am, Jeremy [EMAIL PROTECTED] wrote:
  Could someone help me figure out how to load the total number
 returned in the post request into the total variable of the object?

 Currently, the value of this.total remains zero through the script
 even though the post returns 12.

 $(document).ready(function() {

 function ajax_page(statsendpoint) {

   this.total = 0;

         this.updtotal = function(response){
                 this.total=response.totalnum;
         }

         this.load_pagination = function() {
                 $.post(this.statsendpoint,{
                                          rev_usr_user_id_reviewed: 5
                                    }, this.updtotal,json);
         }

 }


[jQuery] Re: find table rows that contains text

2008-11-25 Thread Sridhar

Thank you that worked. I made some changes since my table row contains
more than one cell.

var mySearch = '63';
var a = $('table tbody tr td a:contains(' + mySearch + ')').filter
(function(){
//alert($.trim($(this).text()));
if($.trim($(this).text()) == mySearch)
return true;
else
return false;
});
var tr = $(a).parents('tr:eq(0)');

Thanks,
sridhar.

On Nov 25, 11:05 am, Pierre Bellan [EMAIL PROTECTED] wrote:
 Hi,
 I think you must use the filter function.
 I made this little test :

 var mySearch = '63';
 $('table tr:contains('+mySearch+')').filter(function(){
     if ($.trim($(this).text()) == mySearch ) {
         return true;
     }
     else{
         return false;
     }

 });

 The text() method removes all html tags, very useful here. The trim()
 function was a jquery addon, very useful too

 Pierre

 Samuel Goldwyn  - I'm willing to admit that I may not always be right, but
 I am never wrong.

 2008/11/25 Sridhar [EMAIL PROTECTED]



  Hi,

    I am trying to get a reference to a table row that contains an
  exact match of a text. But I am getting more than one row. can you
  please help me? Following is the html table structure and the jquery
  script.
  -- html
  table
    tr
        tda063/a/td
    /tr
    tr
        tda63/a/td
    /tr
  /table

  -- script
  var rows = $('table tr:contains(' + ' + '63' + ' + ')');

  as you can see, both the rows contain text 63. But I want to get the
  reference to second row since that contains the exact match. How would
  I do that?

  Thanks,
  sridhar.


[jQuery] Re: validate - error in IE6

2008-11-25 Thread gnix
Thanks for noticing that. I made those changes but the error messages
keep coming.

On Nov 24, 6:21 pm, DumpsterDoggy [EMAIL PROTECTED] wrote:
 I didn't notice at first, but also, your input tags aren't closed
 properly either:

 Should be:
 input class=mls_textSmall type=text
 name=txtZip id=txtZip value= /

 On Nov 24, 8:19 pm, DumpsterDoggy [EMAIL PROTECTED] wrote:

  Your META tag isn't closed properly so this is probably your starting
  point for investigation. Make sure your page validates before you
  start to dig into the JavaScript.

  On Nov 24, 7:21 pm, jquery_newbie [EMAIL PROTECTED] wrote:

   I am trying to run my page with the Validator code but on loading it
   in IE6 I get the Expected ; error followed by Object doesn't
   support this property or method errors. It has absolutely no problems
   in Firefox3. Strangely enough when I comment out the META http-
   equiv=Content-Type content=text/html; charset=UTF-8 line the
   Expected ; error disappears although the validation still does not
   work. Here's my page:

   -
   !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN 
   http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
   html
   head
   META http-equiv=Content-Type content=text/html; charset=UTF-8
   titletest/title
   script type=text/javascript src=jquery.js/script
   script type=text/javascript src=jquery.validate.pack.js/script
   script id=demo type=text/javascript
                           $(function() {

                                   !-- form validation --
                                   $('#frmFilterEvents').validate({
                                           rules: {
                                                   txtStartDate: {
                                                           //sutterdate: 
   true,
                                                           required: 
   #txtEndDate:filled
                                                   },
                                                   txtEndDate: {
                                                           //sutterdate: 
   true,
                                                           required: 
   #txtStartDate:filled
                                                   },
                                                   txtZip: {
                                                           minlength: 5,
                                                           maxlength: 5
                                                   }
                                           },
                                           messages: {
                                                   txtStartDate: mm/dd/ 
   required,
                                                   txtEndDate: mm/dd/ 
   required,
                                                   txtZip: Zip is 5 digits
                                           },
                                           errorPlacement: function(error, 
   element) {
                                                   if ( element.is(:radio) 
   )
                                                           error.appendTo( 
   element.parent().next().next() );
                                                   else if ( 
   element.is(:checkbox) )
                                                           error.appendTo ( 
   element.next() );
                                                   else
                                                           error.appendTo( 
   element.parent() );
                                           }
                                   });

                                   
   $('button[name=submitFilter]').click(function() {
                                   return $('#frmFilterEvents').valid();
                           });
                           })
   /script
   /head
   body style=margin:0;background-color:#FF; class=mls_member
   tpl-3col

           div class=mls_sidebar id=mls_left
             div class=mls_navSub mls mls_colLf
               dl
                 dtFilter Events/dt
                 dd
                   form action=  id=frmFilterEvents method=post

                     fieldset
                     legendDates/legend
                     ol class=mls_dates
                       li
                         label for=txtStartDateFrom/label
                         span class=ui-datepicker-wrap
                         input class=mls_text datePick type=text
   name=txtStartDate id=txtStartDate value=
                         /span /li
                       li
                         label for=txtEndDateTo/label
                         span class=ui-datepicker-wrap
                         input class=mls_text datePick type=text
   name=txtEndDate id=txtEndDate value=
                         /span /li
                     /ol
                     /fieldset
                     fieldset class=mls_last
        

[jQuery] Re: problem with document ready function

2008-11-25 Thread ricardobeat

Hi,

Try removing all the comments in the javascript, Google Groups adds
line breaks that can cause errors. Also I forgot to wrap 'this' in
jQuery:

var subs = $('.menu  ul ul');
subs.hide();
$('.menu  ul  li a').click(function(){
  subs.hide();
  $(this).next('ul').show();
});

- ricardo

On Nov 25, 1:47 pm, firstarsbrnwhite [EMAIL PROTECTED] wrote:
 ricardobeat,

 thank you very much for your response. This is obviously my first time
 working with jquery. I have translated your code to my page with some
 unexpected results. When I click on any .menu  ul  li a all the page
 does is hide the image in my main gallery which is also ran by jquery.
 I don't understand this since nothing in the gallery is a parent
 of .menu. See a live example here:

 http://www.ryanvosburg.com/portfolio/blackcreek/index.html

 I look at your code and it all makes sense to me and should
 theoretically work. I even tried a few different variations using
 the .toggle command with no luck... :(


[jQuery] Re: Replacing DIV with XML

2008-11-25 Thread ricardobeat

Hi,

1. appendTo() appends content: adds content after everything that
already exists. You can use empty() to remove the contents before
appending, that's the exact same result as replace().
2. replaceAll only works the first time because you are replacing the
ol element with a div, so on the second run there is no
'#fichaFilme ol' for the function to find.

That kilometric string concatenation will be a pain to debug, there
are cleaner ways to do it. I took the liberty to recode your example:
http://pastebin.com/m76fa

Basically you have a model mark-up for a movie and you clone it for
each one you are displaying, so you don't need to recreate all the
html in a string.

abraço,
- ricardo

On Nov 25, 9:24 am, Dipi Evil Danger [EMAIL PROTECTED] wrote:
 I´m trying to make an dynamic page with XML values. When the visitor click
 on an item it replaces the content. But it is not doing his job. This is the
 code:
 $('a').click(function() {
 var key = $(this).attr('id').charAt(4);
 $('a').click(function() {
 var key = $(this).attr('id').charAt(4);
      $.ajax({
          type: GET,
          url: ../cms/xmlCinema.php?id=000+key,
          dataType: xml,
          success: function(xml) {

              $(xml).find(filme).each(function(){
                 var texto =  ;
                 var album =  ;
                  var texto = 'div class=moviesTitle' +
 $(this).find('nome').text() + ' (i' + $(this).find('ano').text() +
 '/i)/divbr';
                  texto = texto + 'div class=moviesPosterimg
 id=poster'+key+' name=poster'+key+'
 src=../cinema/poster/000'+key+'.jpg width=95/div';
                  texto = texto + 'div class=moviesLabelNome
 original:/div div class=moviesDatanbsp;' +
 $(this).find('nome_original').text() + '/div';
                  texto = texto + 'div class=moviesLabelEstréia:/div
 div class=moviesDatanbsp;' + $(this).find('data').text() + '/div';
                  texto = texto + 'div class=moviesLabelTrilha:/div
 div class=moviesDatanbsp;' + $(this).find('trilha').text() + '/div';
                  texto = texto + 'div class=moviesLabelGênero:/div
 div class=moviesDatanbsp;' + $(this).find('genero').text() + '/div';
                  texto = texto + 'div class=moviesLabelPaís de
 Origem:/div div class=moviesDatanbsp;' +
 $(this).find('pais_de_origem').text() + '/div';
                  texto = texto + 'div class=moviesLabelSite:/div div
 class=moviesDatanbsp;a href=' + $(this).find('site').text() + '
 target=_blank' + $(this).find('site').text() + '/a/div';
                  texto = texto + 'div class=moviesLabelDuração:/div
 div class=moviesDatanbsp;' + $(this).find('duracao').text() + '
 min./div';
                  texto = texto + 'div class=moviesLabelDireção:/div
 div class=moviesDatanbsp;' + $(this).find('duracao').text() + '
 min./div';
                  //Sinopse
                  texto = texto + 'div class=moviesLabelSinopse:/div
 div class=moviesReleasenbsp;' + $(this).find('sinopse').text() +
 '/div';
                 $('div/div')
                      .html(texto)
                      .replaceAll('#fichaFilme ol');
              }); //close each(
          } //close sucess
      }); //close $.ajax(
     $(#fichaFilme).fadeIn(3000);}); //close click(

 If I use appendTo it adds content. If I use replaceAll it only works in
 the first time.

 Here is the page (working on 
 it):http://www.ncweb.com.br/PHP/index.php?mod=Cinema

 Thanks!

 --
 dipi evil danger
 Gott weiß ich will kein Engel seinhttp://meadiciona.com/dipi


[jQuery] Re: Using jquery to construct menus like nbc.com

2008-11-25 Thread Jeffrey Kretz

If you have a sample url of your code, that would be helpful.

But at a guess, the flyout div is probably not a child of the main menu
element, so the mouseenter and mouseleave won't work properly.  If this is
the case, it will require a minor change to the hover plumbing.

The z-index with flash in IE6/7 can usually be solved by doing two things:

1.  Add the wmode=transparent attribute to the flash movie.
2.  Wrap the object tag in a div set for the same width and height, with
its z-index set for 0.

JK

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of serpicolugnut
Sent: Tuesday, November 25, 2008 7:08 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Using jquery to construct menus like nbc.com



I'm trying to utilize jquery to construct a menu structure that is 
similar to what you see at fox.com and nbc.com. Basically I have a 
menu that is a ul list, with each li selector given it's own id. Below 
I have a div container for each menu item, which are set to be hidden 
by jquery upon load. 

I've been the mousever/mouseout actions to trigger turning each div 
container on/off, but the problems I'm encountering with this are 1) 
it works when hovering over the main menu selection, but not when the 
mouse is inside the div, making selecting sub items difficult/ 
impossible, and 2) for some reason in IE6/IE7, the divs don't show 
when they are over a Flash object. 

Does anybody have any ideas on how to take items #1 and #2? 
-- 
View this message in context:
http://www.nabble.com/Using-jquery-to-construct-menus-like-nbc.com-tp2068217
1s27240p20682171.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.




[jQuery] Re: The last script on ready function

2008-11-25 Thread ricardobeat

Right. That means code at the end of the body then.

I've never seen anything bad happen with that though. Anyone out there
knows the reason for this?

- ricardo

On Nov 25, 2:20 pm, Pierre Bellan [EMAIL PROTECTED] wrote:
 I'm not sure of that.

 In the doc of the ready event, it says

 Please ensure you have no code in your body onload event handler,
 otherwise $(document).ready() may not fire.

 Rodney Dangerfield  - I looked up my family tree and found out I was the
 sap.

 2008/11/25 ricardobeat [EMAIL PROTECTED]



  You can also run it on page load (as opposed to DOM ready):

  $(window).load(function(){

    // scripts to run after page load here

  });

  - ricardo

  On Nov 25, 8:08 am, Pierre Bellan [EMAIL PROTECTED] wrote:
   Hi,

   Put it at the very bottom of your page.
   $(document).ready are executed in LILO order.

   I think that's the only thing it which always works.

   Pierre

   Rodney Dangerfield  - I looked up my family tree and found out I was the
   sap.

   2008/11/25 MarcelloP [EMAIL PROTECTED]

Hi all!
Please, I'm in the need to run a script at the very end of a page
loading. Actually my page runs several script in $(document).ready
function, so I know that these are queued to run one after the others
when the page is loaded. But I must run a single script as the last of
all, how can I do a such things?

Thanks in advance

Marcello


[jQuery] Re: validate - error in IE6

2008-11-25 Thread gnix

Actually, I found the problem. Apparently it was an encoding issue. My
page uses UTF-8 encoding which messes up the validation plugin.
Instead, this is what the experts recommend:
---
@Greg: Thanks for investigating this. I guess the trouble is this:
jquery.validate.js is encoded as ISO-8859-1. The browser uses the
encoding of the page if it isn't specified for the script.

So a workaround specifies the encoding of the script by setting the
charset (eg. script type=text/javascript src=jquery.validate.js
charset=ISO-8859-1″/script.
---
Specifying the encoding at the script level saved my day!

On Nov 25, 9:11 am, gnix [EMAIL PROTECTED] wrote:
 Thanks for noticing that. I made those changes but the error messages
 keep coming.

 On Nov 24, 6:21 pm, DumpsterDoggy [EMAIL PROTECTED] wrote:

  I didn't notice at first, but also, your input tags aren't closed
  properly either:

  Should be:
  input class=mls_textSmall type=text
  name=txtZip id=txtZip value= /

  On Nov 24, 8:19 pm, DumpsterDoggy [EMAIL PROTECTED] wrote:

   Your META tag isn't closed properly so this is probably your starting
   point for investigation. Make sure your page validates before you
   start to dig into the JavaScript.

   On Nov 24, 7:21 pm, jquery_newbie [EMAIL PROTECTED] wrote:

I am trying to run my page with the Validator code but on loading it
in IE6 I get the Expected ; error followed by Object doesn't
support this property or method errors. It has absolutely no problems
in Firefox3. Strangely enough when I comment out the META http-
equiv=Content-Type content=text/html; charset=UTF-8 line the
Expected ; error disappears although the validation still does not
work. Here's my page:

-
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN 
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
html
head
META http-equiv=Content-Type content=text/html; charset=UTF-8
titletest/title
script type=text/javascript src=jquery.js/script
script type=text/javascript src=jquery.validate.pack.js/script
script id=demo type=text/javascript
$(function() {

!-- form validation --
$('#frmFilterEvents').validate({
rules: {
txtStartDate: {
//sutterdate: 
true,
required: 
#txtEndDate:filled
},
txtEndDate: {
//sutterdate: 
true,
required: 
#txtStartDate:filled
},
txtZip: {
minlength: 5,
maxlength: 5
}
},
messages: {
txtStartDate: 
mm/dd/ required,
txtEndDate: mm/dd/ 
required,
txtZip: Zip is 5 
digits
},
errorPlacement: function(error, 
element) {
if ( 
element.is(:radio) )
error.appendTo( 
element.parent().next().next() );
else if ( 
element.is(:checkbox) )
error.appendTo 
( element.next() );
else
error.appendTo( 
element.parent() );
}
});


$('button[name=submitFilter]').click(function() {
return $('#frmFilterEvents').valid();
});
})
/script
/head
body style=margin:0;background-color:#FF; class=mls_member
tpl-3col

div class=mls_sidebar id=mls_left
  div class=mls_navSub mls mls_colLf
dl
  dtFilter Events/dt
  dd
form action=  id=frmFilterEvents method=post


[jQuery] Re: problem with document ready function

2008-11-25 Thread firstarsbrnwhite

Thanks again richardo, here is the final script that works great

$(document).ready(function(){
var subs = $('.menu  ul ul');
subs.hide();
$('.menu  ul  li a').click(function(){
  $(this).next('ul').toggle();
});
});


[jQuery] Re: problem with document ready function

2008-11-25 Thread firstarsbrnwhite

only problem is upon toggling of this menu it also hides the photos in
my jquery gallery
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
jQuery (English) group.
To post to this group, send email to jquery-en@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-en?hl=en
-~--~~~~--~~--~--~---



[jQuery] Re: Pulling images dynamically from a folder.

2008-11-25 Thread howardk

You can do this entirely on the client if

(1) you either know the names of all the image files in the directory
on the server or
(2) you can construct them programatically at runtime.

The latter works for instance if the file names are something like
image_1.png, image_2.png, image_3.png, ..., image_n.png, etc.

If you can do either of these, you just do the following in a loop,
where i is the index on the loop:

image[ i ] = new Image(); // store away the reference for later

image.onerror = function(){ /* this is my error handler */ };
image.onload = function(){ /* and I get here once the image loads
successfully */ };
image.src = urlPath + constructFileName( i ); // go get the image

urlPath would be something like 'localhost/currProject/images/', and
constructFileName( i ) either pulls the name out of a prepopulated
array, as in (1), or builds it as in (2).

You can also get the image stream directly via an $.ajax( ) call and
assign it to image.src on success:, but the above is I believe a bit
simpler.

Hope that helps,
Howard

On Nov 25, 8:14 am, Liam Potter [EMAIL PROTECTED] wrote:
 any server side language.

 fr0st003 wrote:
  So what I could do is use something like PHP, to pull images from the folder
  place them into a array, use the math function to pull something at random
  then use Javascript to style the information. Would this be possible to do
  with Python? I have some experience with Python. And or Ruby?

  craig.kaminsky wrote:

  BlueSky is correct. JavaScript that runs in the browser does not have
  access to either a local or server-based file system. For that you
  need either: (1) a classic server-side programming language (ala
  BlueSky's notes for PHP, ASP.NET, ColdFusion, etc.) or (2) a site that
  runs the Jaxer server from Aptana, which is an open-source server
  running JavaScript on the server. Outside of those two sets of
  options, you would not be able to pull images dynamically from a
  folder (or database or XML file, etc.). You can, however, use jQuery
  to create the previews as you mentioned...once you get you images
  pulled that is!

  Do you know what server-side technologies your web host provides? I'm
  sure I (or someone on the list :) could offer some assistance in the
  type of server-side script you'd need to extract all the files or
  images in a directory.


[jQuery] Re: Using jquery to construct menus like nbc.com

2008-11-25 Thread serpicolugnut


Here's a link to a simplified version of the code. The mouseenter/mouseleave
events helped, but I'm seeing some strangeness on the first menu item, and
then some flickering on the others.

http://dl.getdropbox.com/u/21984/menu_test.html


Jeffrey Kretz wrote:
 
 
 If you have a sample url of your code, that would be helpful.
 
 But at a guess, the flyout div is probably not a child of the main menu
 element, so the mouseenter and mouseleave won't work properly.  If this is
 the case, it will require a minor change to the hover plumbing.
 
 The z-index with flash in IE6/7 can usually be solved by doing two things:
 
 1.  Add the wmode=transparent attribute to the flash movie.
 2.  Wrap the  tag in a div set for the same width and height, with
 its z-index set for 0.
 
 JK
 
 -Original Message-
 From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of serpicolugnut
 Sent: Tuesday, November 25, 2008 7:08 AM
 To: jquery-en@googlegroups.com
 Subject: [jQuery] Using jquery to construct menus like nbc.com
 
 
 
 I'm trying to utilize jquery to construct a menu structure that is 
 similar to what you see at fox.com and nbc.com. Basically I have a 
 menu that is a ul list, with each li selector given it's own id. Below 
 I have a div container for each menu item, which are set to be hidden 
 by jquery upon load. 
 
 I've been the mousever/mouseout actions to trigger turning each div 
 container on/off, but the problems I'm encountering with this are 1) 
 it works when hovering over the main menu selection, but not when the 
 mouse is inside the div, making selecting sub items difficult/ 
 impossible, and 2) for some reason in IE6/IE7, the divs don't show 
 when they are over a Flash object. 
 
 Does anybody have any ideas on how to take items #1 and #2? 
 -- 
 View this message in context:
 http://www.nabble.com/Using-jquery-to-construct-menus-like-nbc.com-tp2068217
 1s27240p20682171.html
 Sent from the jQuery General Discussion mailing list archive at
 Nabble.com.
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Using-jquery-to-construct-menus-like-nbc.com-tp20682171s27240p20687612.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: POST METHOD IN REMOTE PARAM FOR VALIDATE PLUGIN

2008-11-25 Thread Jörn Zaefferer
With the 1.5 release you will be able to use this instead:

$(#myform).validate({
  rules: {
username: {
  required: true,
  remote: {
url: checkusername.php,
type: post
data: {
  email: function() { return $(#email).val() }
}
  }
}
  }
});

In other words, you can override all settings that $.ajax supports by
replacing the current remote: url with remote: {url:url} and add
whatever you need.

You can try it out now
(http://jqueryjs.googlecode.com/svn/trunk/plugins/validate/) or wait
for the next release.

Feedback is welcome!

Jörn

On Sun, Nov 23, 2008 at 4:08 PM, Jörn Zaefferer
[EMAIL PROTECTED] wrote:
 Could you create a ticket for this? http://dev.jquery.com/newticket
 (requires registration)

 Thanks
 Jörn

 On Sun, Nov 23, 2008 at 4:23 AM, Mahbub [EMAIL PROTECTED] wrote:

 The jQuery Validate libraries remote parameter uses GET method for
 AJAX calls. If nothing is given as the type parameter in $.ajax()
 method, GET is taken by default. But working with PHP with some famous
 framework like codeigniter which normally don't work with GET method
 in URL makes it difficult to use the remote parameter. So in the
 Validate plugin, it should be specified type : POST in the following
 method around line 878 of jquery.validate.js (1.4).

remote: function(value, element, param) {
if ( this.optional(element) )
return dependency-mismatch;

var previous = this.previousValue(element);

if (!this.settings.messages[element.name] )
this.settings.messages[element.name] = {};
this.settings.messages[element.name].remote = typeof
 previous.message == function ? previous.message(value) :
 previous.message;

if ( previous.old !== value ) {
previous.old = value;
var validator = this;
this.startRequest(element);
var data = {};
data[element.name] = value;
$.ajax({
url: param,
mode: abort,
port: validate + element.name,
dataType: json,
data: data,
success: function(response) {
if ( !response ) {
var errors = {};
errors[element.name] 
 =  response || validator.defaultMessage
 ( element, remote );

 validator.showErrors(errors);
} else {
var submitted = 
 validator.formSubmitted;

 validator.prepareElement(element);

 validator.formSubmitted = submitted;

 validator.successList.push(element);

 validator.showErrors();
}
previous.valid = response;

 validator.stopRequest(element, response);
}
});
return pending;
} else if( this.pending[element.name] ) {
return pending;
}
return previous.valid;
},







[jQuery] Re: [validate] Sending Two Inputs Together to Remote Validation?

2008-11-25 Thread Jörn Zaefferer
With the 1.5 release you will be able to use this instead:

$(#myform).validate({
  rules: {
username: {
  required: true,
  remote: {
url: checkusername.php,
type: post
data: {
  email: function() { return $(#email).val() }
}
  }
}
  }
});

In other words, you can override all settings that $.ajax supports by
replacing the current remote: url with remote: {url:url} and add
whatever you need.

You can try it out now
(http://jqueryjs.googlecode.com/svn/trunk/plugins/validate/) or wait
for the next release.

Feedback is welcome!

Jörn

On Tue, Nov 25, 2008 at 10:33 AM, Jörn Zaefferer
[EMAIL PROTECTED] wrote:
 Try this:

 $().ajaxSend(function(event, XMLHttpRequest, ajaxOptions) {
  $.extend(ajaxOptions.data, {username: $(#Username).val()});
 });

 This would add the username to each request. Modify as necessary.

 Jörn

 On Mon, Nov 24, 2008 at 8:07 PM, megageorge [EMAIL PROTECTED] wrote:

 Is it possible to send two of the inputs in a form together to a
 remote validation php script?

 For example, I would like to check whether a person called 'Bob' has
 the email address '[EMAIL PROTECTED]'. The php script would need pieces
 of information from both the name input and the email address input.

 How could I do this?

 Thanks in advance,
 George




[jQuery] Re: remote validation with additional parameter

2008-11-25 Thread Jörn Zaefferer
With the 1.5 release you will be able to use this instead:

$(#myform).validate({
  rules: {
username: {
  required: true,
  remote: {
url: checkusername.php,
type: post
data: {
  email: function() { return $(#email).val() }
}
  }
}
  }
});

In other words, you can override all settings that $.ajax supports by
replacing the current remote: url with remote: {url:url} and add
whatever you need.

You can try it out now
(http://jqueryjs.googlecode.com/svn/trunk/plugins/validate/) or wait
for the next release.

Feedback is welcome!

Jörn

On Thu, Nov 20, 2008 at 8:28 PM, Jörn Zaefferer
[EMAIL PROTECTED] wrote:
 The current workaround I recommend is to use ajaxSend:

 $().ajaxSend(function(e, xml, settings) {
  $.extend(settings.data, { field2: $(#field2).val() });
 });

 With the drawback that it gets applied to all ajax requests. Depends
 on your application if thats a problem and how to avoid it.

 Jörn

 On Thu, Nov 20, 2008 at 5:17 PM, SMaDeP [EMAIL PROTECTED] wrote:

 I want to make a duplicate check with remote validation, but I need an
 additional parameter like the parent key
 (no duplicate article numbers within one order)!

 does addMethod support async validation?
 can I add an additional parameter to the remote-url? How?

 Thanks in advance,

 Stefan





[jQuery] Re: Validate and Ajax. Could someone, please, help me?

2008-11-25 Thread Jörn Zaefferer
With the 1.5 release you will be able to use this instead:

$(#myform).validate({
  rules: {
username: {
  required: true,
  remote: {
url: checkusername.php,
type: post
data: {
  email: function() { return $(#email).val() }
}
  }
}
  }
});

In other words, you can override all settings that $.ajax supports by
replacing the current remote: url with remote: {url:url} and add
whatever you need.

You can try it out now
(http://jqueryjs.googlecode.com/svn/trunk/plugins/validate/) or wait
for the next release.

Feedback is welcome!

Jörn

On Sun, Nov 23, 2008 at 1:27 PM, Jörn Zaefferer
[EMAIL PROTECTED] wrote:
 Try this instead:

 $().ajaxSend(function(event, XMLHttpRequest, ajaxOptions) {
  $.extend(ajaxOptions.data, {username: $(#Username).val()});
 });

 Jörn

 On Sun, Nov 23, 2008 at 2:17 AM, shapper [EMAIL PROTECTED] wrote:

 Hello,

 On a form I am remote validation for an email.
 However, to this validation, I also need to provide the inserted
 username which is on another text box.

 I am using the following:

 $().ajaxSend(function(event, XMLHttpRequest, ajaxOptions) {
  ajaxOptions.data.username = $(#Username).val();
 });

 I get an error on Firebug saying:

 ajaxOptions.data is null
 (?)()()Account.js (line 30)
 handle()()JQuery%2...1.2.6).js (line 2093)
 (?)()()JQuery%2...1.2.6).js (line 1875)
 trigger()()JQuery%2...1.2.6).js (line 2034)
 trigger()()JQuery%2...1.2.6).js (line 2267)
 each()()JQuery%2...1.2.6).js (line 762)
 each()()JQuery%2...1.2.6).js (line 155)
 trigger()()JQuery%2...1.2.6).js (line 2266)
 trigger()()JQuery%2...1.2.6).js (line 2002)
 ajax()()JQuery%2...1.2.6).js (line 2748)
 ajax()()Validate...0(1.4).js (line 1057)
 remote()()Validate...0(1.4).js (line 902)
 check()()Validate...0(1.4).js (line 468)
 element()()Validate...0(1.4).js (line 321)
 onfocusout()()Validate...0(1.4).js (line 214)
 delegate()Validate...0(1.4).js (line 289)
 delegate()()Validate...0(1.4).js (line 1097)
 handle()()JQuery%2...1.2.6).js (line 2093)
 handler()()Validate...0(1.4).js (line 1088)
 [Break on this error] ajaxOptions.data.username = $(#Username).val
 ();

 The input id is Username. It is correct. I confirmed it!

 What am I doing wrong?

 And how can I add the username ONLY to this validate?

 I have one more request on the page and I don't want to add the
 username also to it ...
 ... I am afraid that I will get an error.

 I have been trying to solve this but I am stuck.

 Could someone please help me?

 Thanks,
 Miguel





[jQuery] Re: Instantiating multiple plugin instances on the same page

2008-11-25 Thread howardk

I went back to scratch and did up a simplified rewrite of my plugin. I
haven't found the problem with the actual plugin yet, but at least now
I know how the architecture is *supposed* to work.

Chaining doesn't come into it (as suggested by Sean), but the test
code at

http://fatdog.com/multiPluginTest/testMultiPlugins.html

does demonstrate, as stated by Michael, that each invocation of a
function/plugin instantiates a new copy of the function/plugin object,
complete with a fresh slate of local variables. Amazing that I didn't
know that! :-)

It was good to go back to zero, so that I now understand this
important concept. Now on to figuring out why my *real* plugin (not
that much more complicated than this simple test prototype) isn't
working ...

Howard

On Nov 24, 4:20 pm, howardk [EMAIL PROTECTED] wrote:
 Michael and Sean,
 Thanks to both of you. I think I'll take you up on your offer of
 posting some (simplified) code. Sometime tomorrow if I can find the
 time for it ...
 Thanks again,
 Howard

 On Nov 24, 3:49 pm, Michael Geary [EMAIL PROTECTED] wrote:

  You may be worried about a problem that doesn't exist. Every time you call a
  function, JavaScript creates a new, unique set of local variables for that
  invocation of the function. It doesn't reuse the same function invocation
  and its local variables over and over again.

  Now, you *could* write code that would get you in trouble here. For example,
  you could use global variables instead of local variables in your function,
  and those would get overwritten as you might expect.

  But normal JavaScript behavior does exactly what you want here. This is true
  for plugin methods just like any other functions.

  As Shawn suggested, if you have trouble with a specific bit of code, post a
  link to it and someone can take a look at it.

  -Mike

   From: howardk

   Is there a way of instantiating multiple instances of a
   plugin on the same page?

   What I have essentially is an animated effects plugin, and I
   want to be able to invoke separate instantiations of it,
   doing something like the following:

   script
      $( '#effect_1' ).animEffect( { name: 'jumper', color:
   'ff', fps:
   30 } );
      $( '#effect_2' ).animEffect( { name: 'round-the-moon', color:
   '00', fps: 40 } );
   /script

   div id='effect_1'/div
   div id='effect_2'/div

   I'm still fairly new to javascript. As far as I can tell
   though, it looks like it can't be done, since as far as I can
   see, each plugin invocation is really calling the same
   function object over and over again (thereby overwriting
   whatever instance or local variables might have been set in a
   prior invocation).

   Is this correct? Is there a way of doing this, or am I out of luck?
   Howard


[jQuery] Re: Using jquery to construct menus like nbc.com

2008-11-25 Thread Jeffrey Kretz

I made a few changes and reposted it here:

http://test1.scorpiondesign.com/LocalTest7.htm

Changes:

menu1 through menu5 were moved underneath their respective LIs.  When the
menus were NOT children of the LIs, the mouseenter mouseleave kept firing.

#nav { position:relative; }
This allows the absolute positioning of child elements relative to itself.

#menu1, #menu2, #menu3, #menu4, #menu5 {
display:none;
left: 0px;

Rather than hiding the menus with javascript, I set the CSS to display none.
The first toggle called will turn them on.  The left:0px aligns the menus
with the first relatively positioned element, in this case #nav.

$(li.main-nav).bind(mouseenter mouseleave, function(){
  $(this).children('div').toggle(); 
  return false; 
});

So it's a class based selector (less code), and it only binds the parent
element (rather than the parent and child).

Cheers,
JK


-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of serpicolugnut
Sent: Tuesday, November 25, 2008 11:04 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Using jquery to construct menus like nbc.com



Here's a link to a simplified version of the code. The mouseenter/mouseleave
events helped, but I'm seeing some strangeness on the first menu item, and
then some flickering on the others.

http://dl.getdropbox.com/u/21984/menu_test.html


Jeffrey Kretz wrote:
 
 
 If you have a sample url of your code, that would be helpful.
 
 But at a guess, the flyout div is probably not a child of the main menu
 element, so the mouseenter and mouseleave won't work properly.  If this is
 the case, it will require a minor change to the hover plumbing.
 
 The z-index with flash in IE6/7 can usually be solved by doing two things:
 
 1.  Add the wmode=transparent attribute to the flash movie.
 2.  Wrap the  tag in a div set for the same width and height, with
 its z-index set for 0.
 
 JK
 
 -Original Message-
 From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of serpicolugnut
 Sent: Tuesday, November 25, 2008 7:08 AM
 To: jquery-en@googlegroups.com
 Subject: [jQuery] Using jquery to construct menus like nbc.com
 
 
 
 I'm trying to utilize jquery to construct a menu structure that is 
 similar to what you see at fox.com and nbc.com. Basically I have a 
 menu that is a ul list, with each li selector given it's own id. Below 
 I have a div container for each menu item, which are set to be hidden 
 by jquery upon load. 
 
 I've been the mousever/mouseout actions to trigger turning each div 
 container on/off, but the problems I'm encountering with this are 1) 
 it works when hovering over the main menu selection, but not when the 
 mouse is inside the div, making selecting sub items difficult/ 
 impossible, and 2) for some reason in IE6/IE7, the divs don't show 
 when they are over a Flash object. 
 
 Does anybody have any ideas on how to take items #1 and #2? 
 -- 
 View this message in context:

http://www.nabble.com/Using-jquery-to-construct-menus-like-nbc.com-tp2068217
 1s27240p20682171.html
 Sent from the jQuery General Discussion mailing list archive at
 Nabble.com.
 
 
 
 

-- 
View this message in context:
http://www.nabble.com/Using-jquery-to-construct-menus-like-nbc.com-tp2068217
1s27240p20687612.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.




[jQuery] Re: dynamic tree / treeview

2008-11-25 Thread Bhavin


Thanks Jeffrey. I solved issue# 1 almost similar way you suggested.
But I am more concern about issue # 2. I am not sure about the flow. I
want something like:

1) Click on Create Page link. I want to allow users to create data
which will be internally displayed in ulli elements and user can
dragdrop and save the sequence.
2) Open dialog, enter data  Save. Here I am using $.ajax(). Bringing
data from Action class in JSON datatype.
3) I will get data in success of $.ajax(). I can manipulate DOM,
insert ulli elements with data and similar way I can create child,
subchild of the nodes.

The problem here is: When I create children dynamically, I want to
make sure if user clicks on Refresh button then also data should be
retained on the page. In above case, it is not retaining because I am
not sure how to go ahead with that. Should I capture Refresh event,
fire event to the Action class, bring the data and show it on the
page? Or is there any other alternative? How can I make sure that
whatever data I am showing on the page is updated one and latest?

Please advice.

Thanks,
Bhavin




On Nov 22, 3:29 pm, Jeffrey Kretz [EMAIL PROTECTED] wrote:
 I'm not 100% I understood your question, but I'll give it a shot.

 I have a dynamically rendered TreeView that is showing a page hierarchy,
 parent and child.

 There is an option to add/remove pages, as well as drag them around.

 Because I need the id of the page and its parent, I render it in the HTML as
 an attribute.

 li _pageid=132
   PageName1
   ul
     li _pageid=543PageName2/li
     li _pageid=565PageName3/li
   /ul
 /li

 Database updates are handled as such:

 var li = $(this);
 var pageid = parseInt(li.attr('_pageid'));
 var parentid = parseInt(li.parents('li:first').attr('_pageid'));

 If I have a new set of child pages to render after an ajax call:

 var li =tree.find('li[_pageid='+pageid+']');
 if (li.length)
 {
   var ul = li.children('ul');
   if (!ul.length)
     ul = $('ul/ul').appendTo(li);
   ul.html(newchildnodes);

 }

 Does this help?

 JK



 -Original Message-
 From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On

 Behalf Of Bhavin
 Sent: Saturday, November 22, 2008 2:48 PM
 To: jQuery (English)
 Subject: [jQuery] Re:dynamictree/ treeview

 Anybody can guide me on this?

 On Nov 21, 12:55 am, Bhavin [EMAIL PROTECTED] wrote:
  Hi

  I am using jquery to createtreestructure type of functionality
  dynamically. I have to add nodes by opening dialog and save it into
  the database. Once response is returned then I need to show it on the
  page. I have few doubts here:

  1) Once node is inserted into the database and response is rendered on
  the page then how can I fetch id/value of the node. Here, DOM
  shouldn't be updated automatically? I am not able to fetch parent node
  id while adding child into it.

  2) Once data is rendered on the page and if I refresh it then how
  should I show thetreewhich was already created dynamically? Do I
  need to bring all the data from the database by passing parentid?

  Please guide.

  Thanks,
  Bhavin- Hide quoted text -

 - Show quoted text -


[jQuery] Re: dynamic tree / treeview

2008-11-25 Thread Jeffrey Kretz

Unfortunately, I'm not familiar with Action class  Is this a JSP thing?

When the user saves the new page with an ajax call, is it recorded in a
database?

If so, when the user then refreshes, shouldn't the server output the new
page nodes correctly during the HTML render?

JK

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Bhavin
Sent: Tuesday, November 25, 2008 11:53 AM
To: jQuery (English)
Subject: [jQuery] Re: dynamic tree / treeview



Thanks Jeffrey. I solved issue# 1 almost similar way you suggested.
But I am more concern about issue # 2. I am not sure about the flow. I
want something like:

1) Click on Create Page link. I want to allow users to create data
which will be internally displayed in ulli elements and user can
dragdrop and save the sequence.
2) Open dialog, enter data  Save. Here I am using $.ajax(). Bringing
data from Action class in JSON datatype.
3) I will get data in success of $.ajax(). I can manipulate DOM,
insert ulli elements with data and similar way I can create child,
subchild of the nodes.

The problem here is: When I create children dynamically, I want to
make sure if user clicks on Refresh button then also data should be
retained on the page. In above case, it is not retaining because I am
not sure how to go ahead with that. Should I capture Refresh event,
fire event to the Action class, bring the data and show it on the
page? Or is there any other alternative? How can I make sure that
whatever data I am showing on the page is updated one and latest?

Please advice.

Thanks,
Bhavin




On Nov 22, 3:29 pm, Jeffrey Kretz [EMAIL PROTECTED] wrote:
 I'm not 100% I understood your question, but I'll give it a shot.

 I have a dynamically rendered TreeView that is showing a page hierarchy,
 parent and child.

 There is an option to add/remove pages, as well as drag them around.

 Because I need the id of the page and its parent, I render it in the HTML
as
 an attribute.

 li _pageid=132
   PageName1
   ul
     li _pageid=543PageName2/li
     li _pageid=565PageName3/li
   /ul
 /li

 Database updates are handled as such:

 var li = $(this);
 var pageid = parseInt(li.attr('_pageid'));
 var parentid = parseInt(li.parents('li:first').attr('_pageid'));

 If I have a new set of child pages to render after an ajax call:

 var li =tree.find('li[_pageid='+pageid+']');
 if (li.length)
 {
   var ul = li.children('ul');
   if (!ul.length)
     ul = $('ul/ul').appendTo(li);
   ul.html(newchildnodes);

 }

 Does this help?

 JK



 -Original Message-
 From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On

 Behalf Of Bhavin
 Sent: Saturday, November 22, 2008 2:48 PM
 To: jQuery (English)
 Subject: [jQuery] Re:dynamictree/ treeview

 Anybody can guide me on this?

 On Nov 21, 12:55 am, Bhavin [EMAIL PROTECTED] wrote:
  Hi

  I am using jquery to createtreestructure type of functionality
  dynamically. I have to add nodes by opening dialog and save it into
  the database. Once response is returned then I need to show it on the
  page. I have few doubts here:

  1) Once node is inserted into the database and response is rendered on
  the page then how can I fetch id/value of the node. Here, DOM
  shouldn't be updated automatically? I am not able to fetch parent node
  id while adding child into it.

  2) Once data is rendered on the page and if I refresh it then how
  should I show thetreewhich was already created dynamically? Do I
  need to bring all the data from the database by passing parentid?

  Please guide.

  Thanks,
  Bhavin- Hide quoted text -

 - Show quoted text -



[jQuery] Re: problem with document ready function

2008-11-25 Thread firstarsbrnwhite

except on IE 6 and 7. FF and Safari both hide the main photo in the
gallery when clicking on collapsing menu


[jQuery] Re: Using jquery to construct menus like nbc.com

2008-11-25 Thread serpicolugnut


Wow - Thanks Liam. That worked like a charm.


Liam Potter wrote:
 
 
 bind a mouseenter function to the menu div, then a mouseleave function 
 to the sub menu.
 
 Ted wrote:
 I have, and have used the suckerfish method before. The problem is
 I've already created the CSS for the menus based upon them living each
 in their own div, and would like to engineer them based upon that as
 opposed to having to recode the CSS based upon another method.

 Basically my HTML looks like this:

 div id=nav
 ul
 li class=main-nav # Main Item 1 /
 li
  ul class=sub-nav-1
  div id=menu1
  !-- 4 col nav menu code goes here --
  /div
  /ul

 li class=main-nav # Main Item 2 /
 li
 ul class=sub-nav-2
  div id=menu2
  !-- 4 col nav menu code goes here --
  /div
 /ul

 li class=main-nav # Main Item 3 /
 li
 ul class=sub-nav-3
  div id=menu3
  !-- 4 col nav menu code goes here --
  /div
 /ul

 li class=main-nav # Main Item 4 /
 li
 ul class=sub-nav-4
  div id=menu4
  !-- 4 col nav menu code goes here --
  /div
 /ul

 li class=main-nav # Main Item 5 /
 li
 ul class=sub-nav-5
  div id=menu5
  !-- 4 col nav menu code goes here --
  /div
 /ul
 /ul
 /div

 When the user rolls over an item (main-item-#), I want to unhide the
 sub-nav-# ul items, and the enclosed child div with it's 4 col menu
 layout.

 The issue I'm running in to is that using mouseover/mouseout activates
 the menu, but when you move your mouse away from the main menu item,
 the div disappears. I've tried attaching mouseover/mouseout actions to
 the enclosing ul and divs, but those don't seem to register.

 On Nov 25, 10:23 am, RyOnLife [EMAIL PROTECTED] wrote:
   
 Have you looked at the Son of Suckerfish
 method?http://htmldog.com/articles/suckerfish/dropdowns/

 Might be a good starting point to get everything working, then you can
 customize the CSS to get whatever look you're going for.

 On Nov 25, 10:07 am, serpicolugnut [EMAIL PROTECTED] wrote:



 
 I'm trying to utilize jquery to construct a menu structure that is
 similar to what you see at fox.com and nbc.com. Basically I have a
 menu that is a ul list, with each li selector given it's own id. Below
 I have a div container for each menu item, which are set to be hidden
 by jquery upon load.
   
 I've been the mousever/mouseout actions to trigger turning each div
 container on/off, but the problems I'm encountering with this are 1)
 it works when hovering over the main menu selection, but not when the
 mouse is inside the div, making selecting sub items difficult/
 impossible, and 2) for some reason in IE6/IE7, the divs don't show
 when they are over a Flash object.
   
 Does anybody have any ideas on how to take items #1 and #2?
 --
 View this message in
 context:http://www.nabble.com/Using-jquery-to-construct-menus-like-nbc.com-tp...
 Sent from the jQuery General Discussion mailing list archive at
 Nabble.com.
   
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Using-jquery-to-construct-menus-like-nbc.com-tp20682171s27240p20689108.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: :nthchild, :eq help

2008-11-25 Thread meatwad5675


Thank-you Ricardo, the syntax for adding the variable was exactly what I
needed.



ricardobeat wrote:
 
 
 For eq() you can use
 
 $('.images').eq(variable)
 
 nth-child doesn't have it's own function, but you only need to add the
 variable to the selector string:
 
 $('.images:nth-child('+variable+')')
 
 - ricardo
 
 On Nov 25, 11:29 am, [EMAIL PROTECTED]
 [EMAIL PROTECTED] wrote:
 Basic Issue:  Can you use a variable in place of the index in
 functions like :nthchild() and :eq() and if so, how?

 Detailed description:  I'm new to jquery and am trying to create an
 image viewer.  I've marked it up and used jquery so that when you
 click on a thumbnail image, jquery returns the order of the thumbnail
 (1,2,3..) as a variable.  I was hoping that I could use this variable
 as the parameter for :nthchild to select the corrisponding image from
 a list of images (1,2,3...).  The goal is to be able to return the
 corrisponding image's offset and manipulate it.  The thumbnail
 variable is returning properly, but I can't seem to select the
 corresponding image.  I've noticed that :nthchild() and eq() require
 an index.  Does this mean I can't insert a variable there?  Any help
 would be appreciated.  I could paste some code, but since this is a
 just a pet project, I will probably have to clean it up a bit
 first :)  Thanks!

 Matt
 
 

-- 
View this message in context: 
http://www.nabble.com/%3Anthchild%2C-%3Aeq-help-tp20681494s27240p20689241.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] scope issues in safari

2008-11-25 Thread thesubtledoctor

I need to calculate the widths of the divs of class 'clause'
dynamically based on the widths of their contents, divs of class
'word'.  The following code works correctly in Firefox:

jQuery('div.clause').each(function(){
  var width = 0;
   jQuery(this).children('div.word').each(function(){
 var thiswidth = jQuery(this).width();
 var padding = jQuery(this).css('padding-left');
 width = width + parseInt(thiswidth) + parseInt(padding);
});
  jQuery(this).width(width+30);
});

but in Safari it seems that a) the variable 'width' is calculated by
adding the widths of every div.word, not just those within a given
div.clause, b) 'width' is not local within the outer .each brackets,
so that what would be the total width of the second div.clause but for
issue (a) is added on top of the already calculated width for the
first div.clause.

So in Firefox the calculated widths are 187px, 268px, and 353px,
whereas in safari they are 2838px, 8544px, and 34206px.

Can anyone suggest a solution?


[jQuery] validate - only show certain messages

2008-11-25 Thread dmikester1

I am using the validate plugin.  It is very cool and very handy.  I
want to only show the label message error for my email and not show
them for any other inputs.  Can someone help me with this?
Thanks
Mike


[jQuery] jqmodal and ui datepicker problem

2008-11-25 Thread Daniel

Hi

I have a problem with jqmodal and ui datepicker.

Often datepicker just  doesn't appear when I initiate in in a jqmodal
window. Funnywise there isn't any warning or error in firebug.

than I have to clean cache in Firefox and datepicker appears again
during next load of modal window - even it appears slow and somehow
crankier than without modal windows.

I tried many things and spent quite some time on it, but I doesn't get
stable. Any ideas...

my code:.

//jqmodal
$('#mw1').jqm({ajax: 'offer.cfm?at=1oid=#myOfferID#', ajaxText:
'Loading..',trigger: 'a.ad_text_trigger'});

//datepicker
input type=text id=valid_from name=valid_from value= 
input type=text id=valid_to name=valid_to value=/


$().ready(function() {
$('#frm input#valid_from').datepicker($.extend({},

$.datepicker.regional['de'], {

 dateFormat: 'm.d.yy',

 duration: fast,

 showOn: 'both',

 buttonImage:cal.gif',

 buttonImageOnly: true

 }));
$('#frm input#valid_to').datepicker($.extend({},

$.datepicker.regional['de'], {

 dateFormat: 'm.d.yy',

 duration: fast,

 showOn: 'both',

 buttonImage:cal.gif',

 buttonImageOnly: true

 }));

});

Daniel


[jQuery] Re: scope issues in safari

2008-11-25 Thread Jeffrey Kretz

You could try this:

jQuery('div.clause').each(function(){
  var width = 0;
  var words = jQuery(this).children('div.word');
  for (var i=0;iwords.length;i++)
  {
 var word = words.eq(i);
 var thiswidth = word.width();
 var padding = word.css('padding-left');
 width = width + parseInt(thiswidth) + parseInt(padding);
  }
  jQuery(this).width(width+30);
});

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of thesubtledoctor
Sent: Tuesday, November 25, 2008 10:44 AM
To: jQuery (English)
Subject: [jQuery] scope issues in safari


I need to calculate the widths of the divs of class 'clause'
dynamically based on the widths of their contents, divs of class
'word'.  The following code works correctly in Firefox:

jQuery('div.clause').each(function(){
  var width = 0;
   jQuery(this).children('div.word').each(function(){
 var thiswidth = jQuery(this).width();
 var padding = jQuery(this).css('padding-left');
 width = width + parseInt(thiswidth) + parseInt(padding);
});
  jQuery(this).width(width+30);
});

but in Safari it seems that a) the variable 'width' is calculated by
adding the widths of every div.word, not just those within a given
div.clause, b) 'width' is not local within the outer .each brackets,
so that what would be the total width of the second div.clause but for
issue (a) is added on top of the already calculated width for the
first div.clause.

So in Firefox the calculated widths are 187px, 268px, and 353px,
whereas in safari they are 2838px, 8544px, and 34206px.

Can anyone suggest a solution?



[jQuery] Re: IE7: loading XML per ajax

2008-11-25 Thread w-o-m

That's true. But a SVG is still just an XML file. I don't need IE to
draw the grapic, I just need the data. My script, btw, doesn't work
with other XML's either.

ricardobeat wrote:
 IE7 doesn't support SVG afaik.

 On Nov 25, 6:08�am, w-o-m [EMAIL PROTECTED] wrote:
  Hello,
 
  I tried to load a .svg vector graphic with $.ajax, which works
  perfectly well in FF and Opera, but not in Internet Explorer.
 
  My script looks like this:
 
  $(document).ready(function(){
  � � � � $.ajax({
  � � � � � � type: GET,
  � � � � � � url: test.svg,
  � � � � � � dataType: xml,
  � � � � � � success: function(data){ parseSVG(data); },
  � � � � � � error: function(xhr, textStatus, errorThrown){ alert
  (textStatus); }
  � � � � });
 
  });
 
  function parseSVG(svg){
  � /* function that parses the DOM of the file */
 
  }
 
  If I run this in IE7, the error function is called. The alert box then
  reads parsererror.
 
  The svg-file looks like this (renaming it into .xml makes no
  difference):
 
  ?xml version=1.0 encoding=UTF-8 standalone=no?
  svg
  � � � �path
  � � � � � � � � � d=M 167.4375,684.375 L 165.96875,685.71875 z
  � � � � � � � � � id=blablabla
  � � � � � � � � � style=fill:#79b63f;fill-opacity:1; ... /
  � � � �path �... �/
  � � � �path �... �/
  /svg
 
  I assume, that IE doesn't like something about the xml, but I don't
  know what...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
jQuery (English) group.
To post to this group, send email to jquery-en@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-en?hl=en
-~--~~~~--~~--~--~---



[jQuery] Re: dynamic tree / treeview

2008-11-25 Thread Bhavin


I am using Struts here...referring Action class of struts..

Yes, when user saves the page it is inserted successfully in the
database. Data is then displayed on the same page...Now, user clicks
on refresh I need to fire an event to bring the data and render HTML.
Since I manipulated DOM, I won't have new id available in page
source.

Here is the sequence:
1) User types in browser http://server.com/page.do?dispatch=add - for
add operation
2) User will add the data and click on Save
3) Data is saved successfully. Here, I am trying to forward request to
edit action which will show another page so, I can show latest data
anytime on refresh event. I am able to forward the event successfully
but another page is not loaded. I think, because yest $.ajax() call is
not yet completed ?? I want to change URL in browser something like
http://server.com/page.do?dispatch=editpageid=123 - once data is
saved.

Following is my code. Let me know if you can suggest on this or if you
have any further questions:


  $('#savepage').click(function(e) {

  $.blockUI({ message: h1Page:Please wait.../h1 
});

  $.ajax({
  url: '/savePage.do?dispatch=save',
  type:'POST',
  dataType:'json',
  data:{pageid:$(#pageid).val(),pagename:$
(#pagename).val()},
  cache: false,
  success:function(json){
  // here I can manipulate DOM and
show the inserted data
  //$.get('/editPage.htm?dispatch=editpageid=' +
json.pageid);
  },
  complete: function(){
  $(#pageid).val();
  $(#pagename).val();
  $.unblockUI();
  },
  error: function (error) {
  alert(error: + error);
  }
  });
  return false;
  });

Thanks,
Bhavin

On Nov 25, 12:00 pm, Jeffrey Kretz [EMAIL PROTECTED] wrote:
 Unfortunately, I'm not familiar with Action class  Is this a JSP thing?

 When the user saves the new page with an ajax call, is it recorded in a
 database?

 If so, when the user then refreshes, shouldn't the server output the new
 page nodes correctly during the HTML render?

 JK



 -Original Message-
 From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On

 Behalf Of Bhavin
 Sent: Tuesday, November 25, 2008 11:53 AM
 To: jQuery (English)
 Subject: [jQuery] Re: dynamic tree / treeview

 Thanks Jeffrey. I solved issue# 1 almost similar way you suggested.
 But I am more concern about issue # 2. I am not sure about the flow. I
 want something like:

 1) Click on Create Page link. I want to allow users to create data
 which will be internally displayed in ulli elements and user can
 dragdrop and save the sequence.
 2) Open dialog, enter data  Save. Here I am using $.ajax(). Bringing
 data from Action class in JSON datatype.
 3) I will get data in success of $.ajax(). I can manipulate DOM,
 insert ulli elements with data and similar way I can create child,
 subchild of the nodes.

 The problem here is: When I create children dynamically, I want to
 make sure if user clicks on Refresh button then also data should be
 retained on the page. In above case, it is not retaining because I am
 not sure how to go ahead with that. Should I capture Refresh event,
 fire event to the Action class, bring the data and show it on the
 page? Or is there any other alternative? How can I make sure that
 whatever data I am showing on the page is updated one and latest?

 Please advice.

 Thanks,
 Bhavin

 On Nov 22, 3:29 pm, Jeffrey Kretz [EMAIL PROTECTED] wrote:
  I'm not 100% I understood your question, but I'll give it a shot.

  I have a dynamically rendered TreeView that is showing a page hierarchy,
  parent and child.

  There is an option to add/remove pages, as well as drag them around.

  Because I need the id of the page and its parent, I render it in the HTML
 as
  an attribute.

  li _pageid=132
    PageName1
    ul
      li _pageid=543PageName2/li
      li _pageid=565PageName3/li
    /ul
  /li

  Database updates are handled as such:

  var li = $(this);
  var pageid = parseInt(li.attr('_pageid'));
  var parentid = parseInt(li.parents('li:first').attr('_pageid'));

  If I have a new set of child pages to render after an ajax call:

  var li =tree.find('li[_pageid='+pageid+']');
  if (li.length)
  {
    var ul = li.children('ul');
    if (!ul.length)
      ul = $('ul/ul').appendTo(li);
    ul.html(newchildnodes);

  }

  Does this help?

  JK

  -Original Message-
  From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On

  Behalf Of Bhavin
  Sent: Saturday, November 22, 2008 2:48 PM
  To: jQuery (English)
  Subject: [jQuery] Re:dynamictree/ treeview

  Anybody can guide me on this?

  On Nov 21, 

[jQuery] Re: dynamic tree / treeview

2008-11-25 Thread Dirceu Barquette
try my treeview plugin. Maby it can help you.
http://sourceforge.net/projects/jqtreevial/

Dirceu Barquette

2008/11/25 Bhavin [EMAIL PROTECTED]



 Thanks Jeffrey. I solved issue# 1 almost similar way you suggested.
 But I am more concern about issue # 2. I am not sure about the flow. I
 want something like:

 1) Click on Create Page link. I want to allow users to create data
 which will be internally displayed in ulli elements and user can
 dragdrop and save the sequence.
 2) Open dialog, enter data  Save. Here I am using $.ajax(). Bringing
 data from Action class in JSON datatype.
 3) I will get data in success of $.ajax(). I can manipulate DOM,
 insert ulli elements with data and similar way I can create child,
 subchild of the nodes.

 The problem here is: When I create children dynamically, I want to
 make sure if user clicks on Refresh button then also data should be
 retained on the page. In above case, it is not retaining because I am
 not sure how to go ahead with that. Should I capture Refresh event,
 fire event to the Action class, bring the data and show it on the
 page? Or is there any other alternative? How can I make sure that
 whatever data I am showing on the page is updated one and latest?

 Please advice.

 Thanks,
 Bhavin




 On Nov 22, 3:29 pm, Jeffrey Kretz [EMAIL PROTECTED] wrote:
  I'm not 100% I understood your question, but I'll give it a shot.
 
  I have a dynamically rendered TreeView that is showing a page hierarchy,
  parent and child.
 
  There is an option to add/remove pages, as well as drag them around.
 
  Because I need the id of the page and its parent, I render it in the HTML
 as
  an attribute.
 
  li _pageid=132
PageName1
ul
  li _pageid=543PageName2/li
  li _pageid=565PageName3/li
/ul
  /li
 
  Database updates are handled as such:
 
  var li = $(this);
  var pageid = parseInt(li.attr('_pageid'));
  var parentid = parseInt(li.parents('li:first').attr('_pageid'));
 
  If I have a new set of child pages to render after an ajax call:
 
  var li =tree.find('li[_pageid='+pageid+']');
  if (li.length)
  {
var ul = li.children('ul');
if (!ul.length)
  ul = $('ul/ul').appendTo(li);
ul.html(newchildnodes);
 
  }
 
  Does this help?
 
  JK
 
 
 
  -Original Message-
  From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
 
  Behalf Of Bhavin
  Sent: Saturday, November 22, 2008 2:48 PM
  To: jQuery (English)
  Subject: [jQuery] Re:dynamictree/ treeview
 
  Anybody can guide me on this?
 
  On Nov 21, 12:55 am, Bhavin [EMAIL PROTECTED] wrote:
   Hi
 
   I am using jquery to createtreestructure type of functionality
   dynamically. I have to add nodes by opening dialog and save it into
   the database. Once response is returned then I need to show it on the
   page. I have few doubts here:
 
   1) Once node is inserted into the database and response is rendered on
   the page then how can I fetch id/value of the node. Here, DOM
   shouldn't be updated automatically? I am not able to fetch parent node
   id while adding child into it.
 
   2) Once data is rendered on the page and if I refresh it then how
   should I show thetreewhich was already created dynamically? Do I
   need to bring all the data from the database by passing parentid?
 
   Please guide.
 
   Thanks,
   Bhavin- Hide quoted text -
 
  - Show quoted text -


[jQuery] formatting splitting the response from the server using jquery syntax

2008-11-25 Thread Sean

Hi There,

I'm getting a response back from a .net page. The response looks like
this and is variable in length. What is the best way to handle this on
the client using jquery syntax?

Sean

{first: slideshow/52/2.jpg,second: slideshow/52/2_2.jpg}


[jQuery] Re: formatting splitting the response from the server using jquery syntax

2008-11-25 Thread Charlie Griefer
On Tue, Nov 25, 2008 at 2:12 PM, Sean [EMAIL PROTECTED] wrote:


 Hi There,

 I'm getting a response back from a .net page. The response looks like
 this and is variable in length. What is the best way to handle this on
 the client using jquery syntax?

 Sean

 {first: slideshow/52/2.jpg,second: slideshow/52/2_2.jpg}



http://blog.reindel.com/2007/10/02/parse-json-with-jquery-and-javascript/ ?

-- 
I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


[jQuery] Creating a mini menu attached to thumbnail

2008-11-25 Thread spherop


I am trying to create a small menu arrow that will appear next to an image
when moused over. The Menu arrow should go away when the user mouses out of
the image, except if the user mouses into the arrow istelf, in which case it
will display some ajax content.

function postMenus(){
$(.image_thumb).hoverIntent(
function(){
var menu_loc = $(this).offset({ scroll: false});
menu_loc['left'] += $(this).width();
menu_loc['top'] += $(this).height() - 20;
$(#menu).css(menu_loc).show();
}
function(){
$(#menu).hide();
}
);
$(#post_menu).hoverIntent(
function(){ 
$(.video_thumb).unbind('hoverIntent');
},
function(){
$(this).hide();
}
);
}

The above is my starting point, but the unbind is not working really. I have
a feeling there is some pattern, or plugin recommendation that will save me
some headaches here ;) 

-- 
View this message in context: 
http://www.nabble.com/Creating-a-mini-menu-attached-to-thumbnail-tp20690892s27240p20690892.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] plug-in questions

2008-11-25 Thread lukas

I am a bit confused with all the possibilities! I am looking for cross-
browser plug-ins for
  tabbing
  vertical accodion
  flexible pop-ups (thickbox, lightbox, facebox,...) which you also
can use for forms or a gallery.
  pull-down menu that can display sub-folders and offers the option
of cross-marking (like the google menus under their calendar section).

that are preferably light-weights and solid!
any suggestion or experience is welcome! thank you!!


[jQuery] Re: plug-in questions

2008-11-25 Thread Charlie Griefer
On Tue, Nov 25, 2008 at 2:33 PM, lukas [EMAIL PROTECTED] wrote:


 I am a bit confused with all the possibilities! I am looking for cross-
 browser plug-ins for
   tabbing
   vertical accodion
   flexible pop-ups (thickbox, lightbox, facebox,...) which you also
 can use for forms or a gallery.
   pull-down menu that can display sub-folders and offers the option
 of cross-marking (like the google menus under their calendar section).

 that are preferably light-weights and solid!
 any suggestion or experience is welcome! thank you!!


had a look at http://plugins.jquery.com/ ?
-- 
I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


[jQuery] Re: How to bind validation to new loaded form?

2008-11-25 Thread [EMAIL PROTECTED]

I still dont get it, how to bind my new loaded form.

I have installed live query now, but i am still doing it the wrong
way.

used this to bind:

$(#signupForm).bind(submit, function() { return false; })

I should expect that submitting this form, would be disabled
thenbut no

tried this:

$(#signupForm).bind(submit, function() {
   alert(blah blah);
   return false; }

no result too.

and then i included the LiveQuery plugin:

$(#signupForm).livequery(validateSignUp());


also no result

i have 2 versions of my form, the one immediately loaded and the one
loaded afterwards.
first one validations still works second one still not.

I am a real beginner with javascript and jQuery and am usy for several
days now, so help will really really be appreciated.
if needed, i can sent you the url.


[jQuery] Re: plug-in questions

2008-11-25 Thread lukas

thank you, yes i had a look at it. but i don't have the time to test
out all the available options and hence posted my question in order to
get some hands-on experiences.



[jQuery] Re: validate - only show certain messages

2008-11-25 Thread [EMAIL PROTECTED]

Hi there,
i suppose, when you dont want to show a message error, you also do not
want validate that particular input?? (else it sounds not logic to me,
if you validate, you show error messages)

Assuming your code is derivated from the example from the plugin,
you see rules and messages inside the script. You can delete them.
Also in your form you have included classes?? you can remove them.

Not tried out, but i think above is a good thought. let me know


[jQuery] Re: IE7: loading XML per ajax

2008-11-25 Thread George

The error message does indicate that it does not like something about
XML.

Try folowing.
1. Save xml on your drive and simply open it with IE. See if it gives
you an error.
2. What does errorThrown points to?
3. The standalone=no not sure it's valid...

George.



On Nov 25, 3:56 pm, w-o-m [EMAIL PROTECTED] wrote:
 That's true. But a SVG is still just an XML file. I don't need IE to
 draw the grapic, I just need the data. My script, btw, doesn't work
 with other XML's either.



 ricardobeat wrote:
  IE7 doesn't support SVG afaik.

  On Nov 25, 6:08 am, w-o-m [EMAIL PROTECTED] wrote:
   Hello,

   I tried to load a .svg vector graphic with $.ajax, which works
   perfectly well in FF and Opera, but not in Internet Explorer.

   My script looks like this:

   $(document).ready(function(){
   $.ajax({
   type: GET,
   url: test.svg,
   dataType: xml,
   success: function(data){ parseSVG(data); },
   error: function(xhr, textStatus, errorThrown){ alert
   (textStatus); }
   });

   });

   function parseSVG(svg){
   /* function that parses the DOM of the file */

   }

   If I run this in IE7, the error function is called. The alert box then
   reads parsererror.

   The svg-file looks like this (renaming it into .xml makes no
   difference):

   ?xml version=1.0 encoding=UTF-8 standalone=no?
   svg
   path
   d=M 167.4375,684.375 L 165.96875,685.71875 z
   id=blablabla
   style=fill:#79b63f;fill-opacity:1; ... /
   path ... /
   path ... /
   /svg

   I assume, that IE doesn't like something about the xml, but I don't
   know what...- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
jQuery (English) group.
To post to this group, send email to jquery-en@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-en?hl=en
-~--~~~~--~~--~--~---



[jQuery] Instant animations (Superfish)

2008-11-25 Thread Paul DelRe

I'm using the Superfish plugin and which only allows the switching of
submenus with .animate.  Anyone know a options configuration that
makes and instant animation (behaves like .show)?  1ms speed isn't
fast enough either.


[jQuery] Re: Linked tabs that slide in and out when hovering over images

2008-11-25 Thread yaayme


Jack, 

Thanks a bunch! That worked for one image, but what if I have a whole slew
of images that I want to add the same functionality to? I tried created
another container with another image, but when I hovered over one, tabs for
both images showed up.

Thanks again!
-- 
View this message in context: 
http://www.nabble.com/Linked-tabs-that-slide-in-and-out-when-hovering-over-images-tp20676375s27240p20691665.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Selector Help

2008-11-25 Thread Jason

Code:

fieldset
a href= class=link/a
/fieldset

fieldset
a href= class=link/a
/fieldset

fieldset
a href= class=link/a
/fieldset

When a link is clicked, I would like to be able to reference the
particular parent fieldset element, and not all of them.

Something like this doesn't work:

$('.link').click(function () {
$(this+':parent').BLAHBLAHBLAH();
});

Thanks in advance, the help here is top notch!


[jQuery] Re: animate problem with IE7

2008-11-25 Thread ^AndreA^

Ticket opened...
http://dev.jquery.com/ticket/3650

bye,
Andrea

On Nov 24, 11:35 pm, ^AndreA^ [EMAIL PROTECTED] wrote:
 Yesterday I tried to open a ticket but the server (onhttp://dev.jquery.com/)
 was not responding as it should so I posted a thread also in the
 jQuery development google group.

 http://groups.google.com/group/jquery-dev/browse_thread/thread/945f3c...

 Nobody has replied so far...

 I wait a couple of days to see if somebody knows something about it
 and then I'll report it.

 BTW, Jeffrey, thank you very much for your time!!!

 Andrea

 On Nov 24, 6:20 pm, Jeffrey Kretz [EMAIL PROTECTED] wrote:

  Regardless, it is possible that the actual bug may be in the core animate
  function as regards to animating relative percentages.

  Don't forget to open a ticket on it (dev.jquery.com)

  JK

  -Original Message-
  From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On

  Behalf Of ^AndreA^
  Sent: Monday, November 24, 2008 3:06 AM
  To: jQuery (English)
  Subject: [jQuery] Re: animate problem with IE7

  jQuery cycle plugin is very nice but I have had bad experiences with
  plugins...

  Usually they do a lot of things but not exactly what I need, therefore
  I have to start tweaking them and 'often' it would take less time
  doing it from scratch...

  often... ;-)

  On Nov 24, 12:09 am, Anyulled [EMAIL PROTECTED] wrote:
   why don´t you use Jquery Cycle plugin?

   On Nov 22, 10:17 pm, Jeffrey Kretz [EMAIL PROTECTED] wrote:

I'm not an expert in the animation sytem -- you should open a ticket
(dev.jquery.com) and get some others to take a look at it.

When I stepped through the code, I found a potential problem here, line
  3043
of jquery.js

// We need to compute starting value
if ( unit != px ) {
        self.style[ name ] = (end || 1) + unit;
        start = ((end || 1) / e.cur(true)) * start;
        self.style[ name ] = start + unit;

}

The div in question has a starting position of: left:-50%;

The value of end is 50, unit is %.

All of the other divs that had a positive percentage were handled
  correctly.

While processing this div the starting position was somehow altered to
  -4%,
leaving the ending position at 46% (-4 + 50).

I'm not that familiar with the animation plumbing, so I'm not sure why
  this
is occurring.

JK

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of ^AndreA^
Sent: Saturday, November 22, 2008 4:26 PM
To: jQuery (English)
Subject: [jQuery] Re: animate problem with IE7

Hi Jeffrey, thanks.

I deleted the float: left;, i didn't know was useless with
position:absolute;

Anyway, I noted the strange behaviour of the li elements too.

I uploaded jQuery unpacked... if you still want to have a look... ;-)

BTW, there could be something wrong with animate('left','+=50%'); but
that would mean a bug... :-|

Thanks,
Andrea

On Nov 22, 11:51 pm, Jeffrey Kretz [EMAIL PROTECTED] wrote:
 I watched the animation with the IE developer toolbar, and noticed a
couple
 of oddities.

 Firstly, the CSS for the divs are set to both position:absolute and
 float:left.  This is not the source of the problem (I overwrite to
 float:none and tried it), but float:left is unnecessary if with
  absolute
 positioning.

 Anyway, then I monitored the left: position as the animations
  happened.

 While going to the right, everything went as usual.

 Div#0    0% to -50%
 Div#1   25% to -25%
 Div#2   50% to   0%
 Div#3   75% to  25%
 Div#4  100% to  50%
 Div#5  125% to  75%

 All good.

 Then I refreshed and tried going to the left.

 Div#0    0% to  50%
 Div#1   25% to  75%
 Div#2   50% to 100%
 Div#3   75% to 125%
 Div#4  100% to  45%
 Div#5  125% to  48%

 As you can see, divs 0-3 were fine.

 Divs 4 and 5 got WEIRD settings.

 Now, I tried stepping through the code, but your jQuery is minified.

 My guess is there is something wrong with the animate('left','+=50%');

 Cheers,
 JK

 -Original Message-
 From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED]
  On
 Behalf Of ^AndreA^
 Sent: Saturday, November 22, 2008 3:29 PM
 To: jQuery (English)
 Subject: [jQuery] animate problem with IE7

 Hi all,

 I'm working on a

  slideshow/carousel:http://www.lesperimento.netsons.org/various/my_carousel/

 It's works fine except than in IE7/6 (basically as usual... ;-) )

 It's weird also because the next button/arrow works well under IE
 but NOT the prev button/arrow; and that's the problem.

 I explain briefly how the script works.

 When you click the arrows you call next_f(); and prev_f(); that do
 exactly the same thing but in different direction.
 They call three functions:

 1) 

[jQuery] Re: MIT or GPL License

2008-11-25 Thread Karl Swedberg

Yes, you can use one or the other.

--Karl


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




On Nov 25, 2008, at 9:13 AM, Jason Coudriet wrote:


Hello,

When using jQuery, do have we have the option to use just the MIT  
license?


Thanks,
Jason




[jQuery] Re: Any Fortune 500 using the Google Ajax Hosting?

2008-11-25 Thread Bil Corry

Bil Corry wrote on 9/9/2008 11:43 AM: 
 Google, on the other hand, doesn't use the Expires header, they instead
 use the Last-Modified header.  This means that instead of the browser
 just outright using the cached jQuery library, it first has to ask
 Google if the file has been modified for *every* page on your site that
 uses the jQuery library.  All of those unnecessary HTTP requests (one
 per page) add overhead and degrade performance.  So the irony here is
 that you will get BETTER performance for your users by hosting the
 jQuery library yourself and using the Expires header.

I revisited this and Google has switched to using the Expires header for the 
hosted JQuery library (and probably all the others as well).  Not sure who at 
Google made the change, but it's a huge improvement, thanks!


- Bil



[jQuery] Re: problem with document ready function

2008-11-25 Thread ricardobeat

that's odd. Try using a minified (instead of packed) version of your
galleria.js

On Nov 25, 6:16 pm, firstarsbrnwhite [EMAIL PROTECTED] wrote:
 except on IE 6 and 7. FF and Safari both hide the main photo in the
 gallery when clicking on collapsing menu


[jQuery] Re: Selector Help

2008-11-25 Thread Charlie Griefer
On Tue, Nov 25, 2008 at 3:28 PM, Jason [EMAIL PROTECTED] wrote:


 Code:

 fieldset
 a href= class=link/a
 /fieldset

 fieldset
 a href= class=link/a
 /fieldset

 fieldset
 a href= class=link/a
 /fieldset

 When a link is clicked, I would like to be able to reference the
 particular parent fieldset element, and not all of them.

 Something like this doesn't work:

 $('.link').click(function () {
$(this+':parent').BLAHBLAHBLAH();
 });

 Thanks in advance, the help here is top notch!


$('.link').click(function () {
$(this).parent()
});

so if you wanted to get the id of the parent fieldset (assuming one
existed), it'd be:

$('.link').click(function () {
alert($(this).parent().attr('id'));
});

-- 
I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


[jQuery] Re: Selector Help

2008-11-25 Thread Jason

Excellent, thank you.

On Nov 25, 4:24 pm, Charlie Griefer [EMAIL PROTECTED]
wrote:
 On Tue, Nov 25, 2008 at 3:28 PM, Jason [EMAIL PROTECTED] wrote:

  Code:

  fieldset
  a href= class=link/a
  /fieldset

  fieldset
  a href= class=link/a
  /fieldset

  fieldset
  a href= class=link/a
  /fieldset

  When a link is clicked, I would like to be able to reference the
  particular parent fieldset element, and not all of them.

  Something like this doesn't work:

  $('.link').click(function () {
         $(this+':parent').BLAHBLAHBLAH();
  });

  Thanks in advance, the help here is top notch!

 $('.link').click(function () {
 $(this).parent()

 });

 so if you wanted to get the id of the parent fieldset (assuming one
 existed), it'd be:

 $('.link').click(function () {
 alert($(this).parent().attr('id'));

 });

 --
 I have failed as much as I have succeeded. But I love my life. I love my
 wife. And I wish you my kind of success.


[jQuery] Function Optimization w/ jQuery

2008-11-25 Thread halcyonandon

I've been reading the jQuery documentation and trying to improve this
function(well functions) and its siblings, however I'm running into
all sorts of syntactical errors when I make changes past this point.
For example, I know there is a better way to write  this.elements
['activities[ActivitiesTab]'].value = ckd; or  var radios =
document.forms['ActivitiesTab'].elements['activities[ActivitiesTab]'];

But the biggest issue is I know there are alternatives to statements I
make that can be much shorter and faster with jQuery, but any attempts
I make just seem to break it. Any insight into this issue would be
appreciated, thanks!


  initActivityForms: function() {
var radios = document.forms['ActivitiesTab'].elements
['activities[ActivitiesTab]'];
$(actids).each(function(i) {
var fmName = 'ticketSearchForm' + actids[i].ucFirst();
var fm = document.forms[fmName];
$(radios[i]).click(function() {
$.bots.toggleASF(actids[i]);
});
$(fm).submit(function() {
$(radios).each(function(i) {
if (radios[i].checked) {
ckd = radios[i].value;
}
});
this.elements['activities[ActivitiesTab]'].value =
ckd;
});
});
radios[0].checked = true;
},
toggleASF: function(actid) {
$(actids).each(function(i) {
var obb = $('#' + actids[i]);
if (actid == actids[i]) {
$(obb).show();
} else {
$(obb).hide();
}
});
},


[jQuery] Re: weird 404 records in website statistics on jquery js file

2008-11-25 Thread Dave Methvin

Do the IPs those requests have some common ISP, for example Hughes? If
you log the user-agent you might find something in common there too.


  1   2   >