[jQuery] Re: Triggering a link with no click event

2009-01-31 Thread Mauricio (Maujor) Samy Silva


Try:
function linkClick() {
 var target = $('body').find('#test').attr('href');
 window.location = target;
}

Maurício

-Mensagem Original- 
De: Andy789 e...@abcstudio.com.au

Para: jQuery (English) jquery-en@googlegroups.com
Enviada em: sábado, 31 de janeiro de 2009 05:15
Assunto: [jQuery] Triggering a link with no click event




HI All,

It could be a silly question, but I cannot find a simple answer...

I need to trigger a link with href via an external function, i.e.

div onclick=linkClick()Emulating click/div
a id=test href=flash/pdfs/test.html my link/a

function linkClick(){
$(#test).click();

}

It does not work and returns nothing. I understanbd that it is because
the a#test does not have the actual onclick event. So, how can I
emulate click on a#test?

Note, that I cannot modify the a link element or add onclick events. 




[jQuery] Re: Navigation menu

2009-01-31 Thread Joel Birch

Hi Bruno,

Have a look at my Superfish menu plugin. Specifically, check out the
nav-bar demonstration as it behaves precisely like you described.
http://users.tpg.com.au/j_birch/plugins/superfish/#examples

Joel Birch.


[jQuery] Re: Triggering a link with no click event

2009-01-31 Thread Mauricio (Maujor) Samy Silva


Hi Andy,

Sorry. There is no need to use the find() method.

function linkClick() {
 var target = $('#test').attr('href');
 window.location = target;
}

---

But I strongly recommend do not use javascrit whitin the markup.
Keep behavior inside its own layer.

So a best approach should be:

Markup layer
div id=linktestEmulating click/div

Behavior layer:
$(document).ready(function(){
$('#linktest').click(function() {
 var target = $('#test').attr('href');
 window.location = target;
});
});





-Mensagem Original- 
De: Andy789 e...@abcstudio.com.au

Para: jQuery (English) jquery-en@googlegroups.com
Enviada em: sábado, 31 de janeiro de 2009 05:15
Assunto: [jQuery] Triggering a link with no click event




HI All,

It could be a silly question, but I cannot find a simple answer...

I need to trigger a link with href via an external function, i.e.

div onclick=linkClick()Emulating click/div
a id=test href=flash/pdfs/test.html my link/a

function linkClick(){
$(#test).click();

}

It does not work and returns nothing. I understanbd that it is because
the a#test does not have the actual onclick event. So, how can I
emulate click on a#test?

Note, that I cannot modify the a link element or add onclick events. 




[jQuery] Re: SUPERFISH Vertical Help

2009-01-31 Thread Joel Birch

On Jan 30, 7:57 am, bellaluna316 bellaluna...@gmail.com wrote:
 RE: Vertical hover.  I am trying to do the following and can not
 figure out what CSS code controls these things:

Hello,

While I no longer offer general CSS help for Superfish menus, here are
a few pointers:

 •     Move the bullets off the left edge of both parent and sub “buttons”
Using Firebug it is simple to see that the bullets are background
images on the anchor elements. These are controlled by template.css
file, around line 30. In the following line (below), replace 'left
center' with px, em or percentage values to position the bullets
image:
ul.menu a {
background:transparent url(../images/menu-list.gif) no-repeat scroll
left center;
...

 •     Make the “buttons” shorter (set height)
Strange, I can't find which CSS is providing the menu item height. The
Superfish demos use vertical padding on the anchor element for this.

 •     Move the hover flyout “button” to butt up against the parent.
 Currently there is a gap between the left edge of the parent and the
 right edge of the flyout.
In Firefox, your menu already does this. The 'left' property on the
submenu 'ul' controls this.

Joel.


[jQuery] Re: White spots while fading images

2009-01-31 Thread Samyak Bhuta

Hi ,

The black background trick is working.

Thanks a ton, Ricordo.

Regards,

Samyak
On 1/31/09, Samyak Bhuta samyak.bh...@gmail.com wrote:
 Hi Ricardo,

  What should be the image format ? I am using .jpg as of now.

  Thanks for the help.


  Samyak


  On 1/31/09, Ricardo Tomasi ricardob...@gmail.com wrote:
  
It's a known IE bug, the solutions are 1) change your image format, 2)
set the container background color to black, that will hide the
failure.
  
  
On 31 jan, 04:44, Samyak Bhuta samyak.bh...@gmail.com wrote:
 Hello All,

 I am using the animated innerfade pluggin 
 (http://www.openstudio.fr/Animated-InnerFade-with-JQuery.html?lang=en)
 to provide the image transistion using fade-in/fade-out effects. Every
 thing is working fine in other browser but IE is showing some white
 pixels here and there on the images white they are fading.

  
You could see this happening onhttp://www.anvay.net/pnrconsultings/
  
   
 List of images where you can see white spots are

 * 2nd image, titled  team spirit 
 * 3rd image, titled vigor

 Observations :
 * They are effecting the same set of images.
 * They always affecting the same pixels.
 * Only during the fade-in and fade-out you could see that.

 Could anyone tell me what is the reason this, I know IE is evil.
 Please help me fight the evil. Can't tell my client and thier end user
 ( client's client ) to switch to better browsers , atleast for now.

 Thanks in advance,

 Samyak



[jQuery] Re: cfdiv and jQuery

2009-01-31 Thread Richard

It is a coldfusion tag that creates a HTML div tag and lets you use
asynchronous form submission or a bind expression to dynamically
control the tag contents.

On Jan 31, 1:37 am, boermans boerm...@gmail.com wrote:
 On Jan 31, 8:33 am, Richard rich...@visual-style.co.uk wrote: so I use 
 $('.userListItem:eq(0)') to select the first occurence of a
  div with the userListItem class. This doesn't work when the item is
  within a cfdiv, but it does work if I put the item outside a cfdiv.

 Sorry, what is a cfdiv?


[jQuery] Re: [validate] rules section problem

2009-01-31 Thread TUNGA

Hi Jörn,

Thanks for your reply. Here is the sample:

http://nrzv.com/valid/

step 1 works well. on Step 2 there is a rule section like:

rules: {
secondSentDocumentsTo: {
required: { depends: 
#secondPermanentAddress:filled }

}
}

When you submit Step 1 and come on Step 2, even other validation(s)
works, secondSentDocumentsTo depends section does not work.

its working if you access the page via:
http://nrzv.com/valid/?s=2

Both of access type uses load() function to load pages


You can see the source via:

http://nrzv.com/valid/index.php
http://nrzv.com/valid/1.php
http://nrzv.com/valid/2.php

and the content of process.php is :

?=print $(\#myApplDiv\).load(\2.php\); ;?

Thanks
Mesut TUNGA




On 28 Ocak, 20:56, Jörn Zaefferer joern.zaeffe...@googlemail.com
wrote:
 Can't spot any issues in that snippets. Could you post a testpage?

 Jörn

 On Wed, Jan 28, 2009 at 6:22 PM, TUNGA mesut.tu...@gmail.com wrote:

  Hello,

  I use validation code someting below. It works if I load that page
  directly. But loading it from another page using $(#myApplDiv).load
  ('that_page.php') therulessections does not work. But submitHandler
  section works well.

  script
  $().ready(function() {
  // some codes here
                 var validator = $(#myForm).bind(invalid-form.validate, 
  function
  () {
                         $(#summary).html(Error);
                 }).validate({
                         submitHandler: function() {
  // some codes here
                         },

                 rules: {
                         fieldName {
                                 required: { depends: 
  #anotherFieldName:checked }
                         }
                 }
                 });
  });
  /script

  Any suggestions?

  Thanks
  Mesut TUNGA


[jQuery] Re: rules section problem

2009-01-31 Thread TUNGA

P.S. : http://nrzv.com/valid/?s=2

loads $(#myApplDiv).load(2.php); into the index.php



On 31 Ocak, 13:22, TUNGA mesut.tu...@gmail.com wrote:
 Hi Jörn,

 Thanks for your reply. Here is the sample:

 http://nrzv.com/valid/

 step 1 works well. on Step 2 there is a rule section like:

                rules: {
                         secondSentDocumentsTo: {
                                 required: { depends: 
 #secondPermanentAddress:filled }

                         }
                 }

 When you submit Step 1 and come on Step 2, even other validation(s)
 works, secondSentDocumentsTo depends section does not work.

 its working if you access the page via:http://nrzv.com/valid/?s=2

 Both of access type uses load() function to load pages

 You can see the source via:

 http://nrzv.com/valid/index.phphttp://nrzv.com/valid/1.phphttp://nrzv.com/valid/2.php

 and the content of process.php is :

 ?=print $(\#myApplDiv\).load(\2.php\); ;?

 Thanks
 Mesut TUNGA

 On 28 Ocak, 20:56, Jörn Zaefferer joern.zaeffe...@googlemail.com
 wrote:

  Can't spot any issues in that snippets. Could you post a testpage?

  Jörn

  On Wed, Jan 28, 2009 at 6:22 PM, TUNGA mesut.tu...@gmail.com wrote:

   Hello,

   I use validation code someting below. It works if I load that page
   directly. But loading it from another page using $(#myApplDiv).load
   ('that_page.php') therulessections does not work. But submitHandler
   section works well.

   script
   $().ready(function() {
   // some codes here
                  var validator = $(#myForm).bind(invalid-form.validate, 
   function
   () {
                          $(#summary).html(Error);
                  }).validate({
                          submitHandler: function() {
   // some codes here
                          },

                  rules: {
                          fieldName {
                                  required: { depends: 
   #anotherFieldName:checked }
                          }
                  }
                  });
   });
   /script

   Any suggestions?

   Thanks
   Mesut TUNGA


[jQuery] appendingTo a just created element

2009-01-31 Thread Nicky

Hi All,

I'm fairly new to jQuery so I apologize if I'm missing something
straightforward but doing this:

$('div/')
.attr('id', 'someID')
.insertBefore(elm);
$('p/')
.appendTo('someID');

Seems to give me errors. If I change appendTo('someID') to a
different element's ID, it works fine, so I get the feeling that it
can't append to the just-created div. Is this not the case? What
should I do to move forward?

Thanks for the help!


[jQuery] ZendX_JQuery

2009-01-31 Thread Junaid

Hi,
I just started to try ZendX_JQuery as in the documentation, but not
working :(

Where I need to put the JQuery javascript library files.

Thanks in advance.

Junaid


[jQuery] selecting multiple elements containing same word in the id attribute

2009-01-31 Thread goldy

ok, now, my question is how to do that and put those matched ids in an
array
after that I will have possibility to do what I want.
all tha I want to do with jquery

here is some test html
html
head
/head
body
div
div id=prefix1/div
div id=prefix2/div
div id=prefix3/div
div id=noprefix1/div
/div
/body
/html
sorry , if my question is noobish, but I'm a beginner in jquery using


[jQuery] Superfish Dropdown BG Problem

2009-01-31 Thread bklyn2cali

Hi,

I'm setting up my first Joomla site and had a request to add drop down
menus. I located Superfish and installed it. Simple, clean, no
problems. But wait...

It all works well, except for the fact that there is no background
image or color on the dropdown items.  I cannot seem to address the
background of the list items. All are ignored in the superfish.css
file. The odd thing is that the drop shadow shows up if I opt it. And
the direction arrows work fine too. I don't know why the bg does not.

Here's the code that I'm changing that has no effect:

 .sf-menu li {
background: #BDD2FF;  /* this is the superfish default that 
does not
appear
background: url('../images/normal_bg.png') 0 0 repeat-x;  /*ths is
the bg image that does not appear
}
.sf-menu li li {
background: #AABDE6;
background: url('../images/normal_bg.png') 0 0 repeat-x;
}
.sf-menu li li li {
background: #9AAEDB;
background: url('../images/normal_bg.png') 0 0 repeat-x;
}
.sf-menu li:hover, .sf-menu li.sfHover,
.sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active {
background: #CFDEFF;
background: url('../images/normal_bg.png') 0 0 repeat-x;
outline:0;
}


I've been lost many hours on this one and cannot solve it. Can someone
take a look and see what I'm doing incorrectly? The site is
http://www.stcyril.net/site/

Thanks in advance.


[jQuery] jQuery 1.3 not working on Firefox 2 or below. Help please.

2009-01-31 Thread Sonu27

My website uses an accordion and equal height columns using jQuery
1.3.

It works in Firefox 3, IE 7, etc.

Any reason it doesn't work?

Here's the site:
http://amarjeetrai.co.uk/C3Web/index.html

Please help.

Thanks.


[jQuery] Superfish

2009-01-31 Thread bklyn2cali

Hi,

I'm setting up my first Joomla site and had a request to add drop down
menus. I located Superfish and installed it. Simple, clean, no
problems. But wait...

It all works well, except for the fact that there is no background
image or color on the dropdown items.  I cannot seem to address the
background of the list items. All are ignored in the superfish.css
file. The odd thing is that the drop shadow shows up if I opt it. And
the direction arrows work fine too. I don't know why the bg does not.

Here's the code that I'm changing that has no effect:

 .sf-menu li {
background: #BDD2FF;  /* this is the superfish default that 
does not
appear
background: url('../images/normal_bg.png') 0 0 repeat-x;  /*ths is
the bg image that does not appear
}
.sf-menu li li {
background: #AABDE6;
background: url('../images/normal_bg.png') 0 0 repeat-x;
}
.sf-menu li li li {
background: #9AAEDB;
background: url('../images/normal_bg.png') 0 0 repeat-x;
}
.sf-menu li:hover, .sf-menu li.sfHover,
.sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active {
background: #CFDEFF;
background: url('../images/normal_bg.png') 0 0 repeat-x;
outline:0;
}


I've been lost many hours on this one and cannot solve it. Can someone
take a look and see what I'm doing incorrectly? The site is
http://www.stcyril.net/site/

Thanks in advance.


[jQuery] Superfish Dropdown BG Problem

2009-01-31 Thread bklyn2cali

Hi,

I'm setting up my first Joomla site and had a request to add drop down
menus. I located Superfish and installed it. Simple, clean, no
problems. But wait...

It all works well, except for the fact that there is no background
image or color on the dropdown items.  I cannot seem to address the
background of the list items. All are ignored in the superfish.css
file. The odd thing is that the drop shadow shows up if I opt it. And
the direction arrows work fine too. I don't know why the bg does not.

I've tried to post the code here, but the form submission doesn't seem
to like that.

I've been lost many hours on this one and cannot solve it. Can someone
take a look and see what I'm doing incorrectly? The site is
http://www.stcyril.net/site/

Thanks in advance.
Reply

Forward



[jQuery] Selecting form ID from $(this)

2009-01-31 Thread frodosghost

Howdy Guys,
A bit of a problem I have been struggling with for a number of hours,
and some help would go a long way.

Its not really a problem with the $.ajax() function. It is more a
problem with selecting live variables on the fly. I have multiple
forms on one page, so selecting that one form to use and update data
is what I am looking at doing.

$.variables = {}; //Sets up an array so I can call the vars in which
ever function I'd like to.

$('[id^=credit]').change(function() {
  $.variables = {formID : $(this).attr('id')}; // Meant to pass the
id, but passes an object.
  $.ajax({
type: POST,
url: /credits/edit,
data: $(this).serialize(),
beforeSend: function(){
  $(#[$.variables.formID]).append(YAY); //Just to put
something in this form id.
  console.log($( [$.variables.formID] )); // Returns this in the
console: Object length=1 0=credit1 jquery=1.3.1
},
success: function(html) {},
  })

So I have set the variable.formID after the .change function. It
passes an object, but I am looking at passing the actual id, so that I
can put some data into that form id...

If I use this $(#[$.variables.formID][0]).append(YAY); code in the
first line of the before send (in an effort to get to the [0] in the
object it passes, it updates all forms on the page with the .append.
But it only sends the data from that one form.

Because there is a number of forms on this one page, I'd just like to
be able to select the id for the form, so I can update data in that
form - At this stage I can get data into any form with an ID, but not
the form that has been used.

Am I missing something? I could have completely stuffed up how to do
it. Any tips would be welcome.

Thanks


[jQuery] $(this).ready with images

2009-01-31 Thread frederik.r...@gmail.com

Hi!

I have the following task: I have a list of images and some of those
images have a larger version that I want to display in a popup when
clicking on them. As I want to generate those Popup-Links
automatically I need to know the size of the large image. I do this by
loading the large image into the list (without showing), getting it's
height  passing it on to the function generating the popup. Of course
the (hidden) image has to be fully loaded for this. I try to wait for
that by using $('.myimage').ready(function(){actions go here}), but
somehow it won't wait (and returns dimensions of 0x0). As soon as my
browser has cached the images everything works fine. Any idea how to
get the function wait for the image to load?

Code goes like this:
function popup(pfad){

var hoehe = 0;
var breite = 0;

$('.asset:visible').append('img class=sizeCheck src='+pfad+'
style=display:none');


$('.sizeCheck').ready(function(){

$('.sizeCheck').each(function(){
hoehe = this.height;
breite = this.width;
});

$('.sizeCheck').remove();

var Grossansicht = window.open(pfad,'Grossansicht','width='+breite
+',height='+hoehe+',top=20,left=20');
Grossansicht.document.write('htmlheadstyle type=text/cssbody,
html{margin: 0 0 0 0; padding: 0 0 0 0;}/style/headbodyimg
src='+pfad+'/body');
Grossansicht.focus();

});

Thanks alot in advance!


[jQuery] Re: ZendX_JQuery

2009-01-31 Thread Colin Guthrie


'Twas brillig, and Junaid at 31/01/09 10:48 did gyre and gimble:

Hi,
I just started to try ZendX_JQuery as in the documentation, but not
working :(

Where I need to put the JQuery javascript library files.


Make sure you've registered the jquery helper in your view and make sure 
 you add the relevent foo into your layouts head area.


By default it includes jquery source from the google CDN system, but you 
can override this with local copy if you like.


I'd go over the docs again as I followed them just the other day and 
everything worked fine.


Col

--

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mandriva Linux Contributor [http://www.mandriva.com/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]



[jQuery] Re: Superfish Dropdown BG Problem

2009-01-31 Thread Joel Birch

Hello,

This is the exact same issue someone else had just the other day, and
they were also a Joomla user. Your problem is figure out by selecting
the menu li element using Firebug. The Superfish background rule is
being overridden by the #pillmenu li li rule which is in the green.css
file. The reason this rule gets precedence over the Superfish CSS is
because it uses an id in the selector, which trumps the .sf-menu class
selector.

Interestingly, 'pillmenu' was the exact same id that was involved with
the other Joomla user's issue, so I assume it must be part of Joomla's
templates. Solve your problem by adding the id to your Superfish
selector in order to increase its 'specificity', like this:

#pillmenu .sf-menu li { background: #BDD2FF url('../images/
normal_bg.png') repeat-x 0 0; }

Joel Birch.


[jQuery] Re: appendingTo a just created element

2009-01-31 Thread Stephan Veigl

the selector for an id is #, sou you should use #someID instead of
someID for the appendTo() function.

by(e)
Stephan


2009/1/31 Nicky nha...@gmail.com:

 Hi All,

 I'm fairly new to jQuery so I apologize if I'm missing something
 straightforward but doing this:

 $('div/')
.attr('id', 'someID')
.insertBefore(elm);
 $('p/')
.appendTo('someID');

 Seems to give me errors. If I change appendTo('someID') to a
 different element's ID, it works fine, so I get the feeling that it
 can't append to the just-created div. Is this not the case? What
 should I do to move forward?

 Thanks for the help!



[jQuery] Re: $(this).ready with images

2009-01-31 Thread Stephan Veigl

Hi,


the event you are looking fore is the image load event.

try:
$('.myimage').load(function(){...});

by(e)
Stephan




2009/1/31 frederik.r...@gmail.com frederik.r...@gmail.com:

 Hi!

 I have the following task: I have a list of images and some of those
 images have a larger version that I want to display in a popup when
 clicking on them. As I want to generate those Popup-Links
 automatically I need to know the size of the large image. I do this by
 loading the large image into the list (without showing), getting it's
 height  passing it on to the function generating the popup. Of course
 the (hidden) image has to be fully loaded for this. I try to wait for
 that by using $('.myimage').ready(function(){actions go here}), but
 somehow it won't wait (and returns dimensions of 0x0). As soon as my
 browser has cached the images everything works fine. Any idea how to
 get the function wait for the image to load?

 Code goes like this:
 function popup(pfad){

 var hoehe = 0;
 var breite = 0;

 $('.asset:visible').append('img class=sizeCheck src='+pfad+'
 style=display:none');


 $('.sizeCheck').ready(function(){

 $('.sizeCheck').each(function(){
 hoehe = this.height;
 breite = this.width;
 });

 $('.sizeCheck').remove();

 var Grossansicht = window.open(pfad,'Grossansicht','width='+breite
 +',height='+hoehe+',top=20,left=20');
 Grossansicht.document.write('htmlheadstyle type=text/cssbody,
 html{margin: 0 0 0 0; padding: 0 0 0 0;}/style/headbodyimg
 src='+pfad+'/body');
 Grossansicht.focus();

 });

 Thanks alot in advance!



[jQuery] animations on textarea

2009-01-31 Thread jk

Hi guys.

There is some reasonable code in the jquery.fx module which stops to
be reasonable when working with textareas.

1. jQuery.fx.prototype.update
It changes display to 'block', which may not be good for textareas.
I've made this workaround and you might want to add this 'inline'
option (or something more unified) too.

$.fx.prototype.originalUpdate = $.fx.prototype.update;
$.fx.prototype.update = false;
$.fx.prototype.update = function () {
if (!this.options.inline) return this.originalUpdate.call(this);
if ( this.options.step )
this.options.step.call( this.elem, this.now, this );
(jQuery.fx.step[this.prop] || jQuery.fx.step._default)
( this );
};


2. jQuery.fn.animate

if ( opt.overflow != null )
 this.style.overflow = hidden;

Again, on textarea you shouldn't change overflow property in order to
Make sure that nothing sneaks out.
No option needed for this.

Thanks guys. Hope to see these issues solved in the next release.


[jQuery] Stop unwanted animation in accordion

2009-01-31 Thread Martin Berglund

Hi

I have tried to make a tiny accordion where .mouseover
triggers .show/.hide, and it seems to work alright. The issue I am
trying to solve is to prevent the animation from running after the
cursor is moved through the whole accordion. I want to get rid of the
chain reaction, if that is an understandable way to explain it.

You can se it here: http://jsbin.com/ikobi

- Martin Berglund


[jQuery] Re: appendingTo a just created element

2009-01-31 Thread Nicky

Ah, very sorry about that mistype, but that is in fact what I am doing
(just replaced my code wrong when I changed what I have to 'someID')

Here's what I have, exactly:

$('div/')
.attr('id', 'ntww-'+serial)
.insertBefore(elm);
$('p/')
.appendTo('#ntww-'+serial);

Sorry about that and thanks for the reply!

-Nicky

On Jan 31, 9:28 am, Stephan Veigl stephan.ve...@gmail.com wrote:
 the selector for an id is #, sou you should use #someID instead of
 someID for the appendTo() function.

 by(e)
 Stephan

 2009/1/31 Nicky nha...@gmail.com:



  Hi All,

  I'm fairly new to jQuery so I apologize if I'm missing something
  straightforward but doing this:

  $('div/')
         .attr('id', 'someID')
         .insertBefore(elm);
  $('p/')
         .appendTo('someID');

  Seems to give me errors. If I change appendTo('someID') to a
  different element's ID, it works fine, so I get the feeling that it
  can't append to the just-created div. Is this not the case? What
  should I do to move forward?

  Thanks for the help!


[jQuery] Re: Getting the height of a hidden div in Firefox

2009-01-31 Thread omtay38

I know its probably not the best solution, but what if you showed the
div just long enough to get the height, hid it again and then slid it
down. You could prevent the div from actually showing by giving it
something like .css(left,-1px) before using .show(). Just a
thought.

Tommy


On Jan 30, 2:00 pm, rob303 rob.cub...@googlemail.com wrote:
 Oh, one other thing.  If I call .css('display', 'block') on the
 element before using height() FF gives me the correct value of 240px.
 Obviously, that breaks the accordion because I want the element
 hidden!

 /me scratches head ...

 Rob.

 On Jan 30, 7:57 pm, rob303 rob.cub...@googlemail.com wrote:

  Thanks for the reply Eric.  But what have different box models got to
  do with it? I'm not setting any border or padding properties on my
  hidden div that would effect the height.  And the difference between
  the two browsers is huge.  IE says 240px and FF says 160px.  I
  certainly don't have 80px worth of padding on that element ...

  Rob.

  On Jan 30, 7:45 pm, Eric Garside gars...@gmail.com wrote:

   Different box models. I'd read up more on the difference between the
   IE/FF box models to point you in the right direction. I'd give you a
   quick tutorial, but I get out at 3 on Fridays! :D

   On Jan 30, 1:52 pm, rob303 rob.cub...@googlemail.com wrote:

Hi,

I've been working on this for days.  The chaps on IRC couldn't find an
answer so I thought I'd post it here just in case anyone knows what's
going on.

I have a basic accordion type feature.  The designer wants to be able
to open more than one of hidden the sections at once ...

So, here is my code:

$(.accordion .accordion_header).click(function() {
    if($(this).hasClass('accordion_selected')) {
          $(this).removeClass('accordion_selected').next().slideUp
({duration: 'slow', easing: 'easeInOutQuad'});
        } else {
          $(this).addClass('accordion_selected').next().slideDown
({duration: 'slow', easing: 'easeInOutQuad'});
        }
  }).next().hide();

.accordion {
  width: 97%;
  list-style-type: none;

}

.accordion_header {
  display: block;
  height: 20px;
  background: url(../images/bgd_accordion_off.gif) repeat-x;
  padding: 5px 10px 0 10px;

}

.accordion_header:hover {
  background: url(../images/bgd_accordion_on.gif) repeat-x;
  color: #d7d7d9;

}

.accordion_selected {
  background: url(../images/bgd_accordion_on.gif) repeat-x;
  color: #d7d7d9;

}

.accordion_section {
  display: block;
  line-height: 20px;
  padding: 0 10px 0 10px;

}

ul class=accordion
  li
    a href=javascript:; class=accordion_headerheading/a
    div class=accordion_section
      A bunch of text
    /div
  /li
/ul

The problem I face is that the content within the hidden div
(accordion_section) is db driven so I have no idea what content to put
in there.  This means I cannot fix the height of those divs.  This in
turn breaks the animate on the slideDown function.  If I set the
height of the div the animate is perfect.  Without it everythings all
jumpy and broken looking.  So I figured that all I needed to do was to
get the height of the hidden div and then apply it using  a css()
call.  This works fine in IE but Firefox doesn't seem able to give me
the correct height for the div.  For example if I use this code:

var h = $(this).next().height();
alert(h);

IE gives me 240 - which correct for that particular div.  But firefox
gives 160 for the same div! Anyone know why?

Many thanks in advance for any help.

Rob.


[jQuery] Re: $(this).ready with images

2009-01-31 Thread frederik.r...@gmail.com

Hi  thanks for the answer, it worked fine this way.
Although I understood the documentation in a way that load will only
fire if the image still has to loaded. What happens when the image
already is in the Browser's cache?

Thanks again!



[jQuery] Re: $(this).ready with images

2009-01-31 Thread MorningZ

if its in the cache, then it will be loaded (much) faster   so
either cache or no cache, the page still has to load it

On Jan 31, 10:09 am, frederik.r...@gmail.com
frederik.r...@gmail.com wrote:
 Hi  thanks for the answer, it worked fine this way.
 Although I understood the documentation in a way that load will only
 fire if the image still has to loaded. What happens when the image
 already is in the Browser's cache?

 Thanks again!


[jQuery] Re: Getting the height of a hidden div in Firefox

2009-01-31 Thread rob303

Hi Tommy,

Many thanks.  That's exactly what I came up with over night.

$(this).next().css('display', 'block');
var h = $(this).next().height();
$(this).next().hide();
$(this).addClass('accordion_selected').next().height(h).slideDown
({duration: 700, easing: 'easeInOutQuad'});

Gives me the correct height in FF and it happens so fast that the div
isn't shown.  The slideDown is now perfectly smooth in both browsers.

Cheers,

Rob.

On Jan 31, 3:04 pm, omtay38 omta...@gmail.com wrote:
 I know its probably not the best solution, but what if you showed the
 div just long enough to get the height, hid it again and then slid it
 down. You could prevent the div from actually showing by giving it
 something like .css(left,-1px) before using .show(). Just a
 thought.

 Tommy

 On Jan 30, 2:00 pm, rob303 rob.cub...@googlemail.com wrote:

  Oh, one other thing.  If I call .css('display', 'block') on the
  element before using height() FF gives me the correct value of 240px.
  Obviously, that breaks the accordion because I want the element
  hidden!

  /me scratches head ...

  Rob.

  On Jan 30, 7:57 pm, rob303 rob.cub...@googlemail.com wrote:

   Thanks for the reply Eric.  But what have different box models got to
   do with it? I'm not setting any border or padding properties on my
   hidden div that would effect the height.  And the difference between
   the two browsers is huge.  IE says 240px and FF says 160px.  I
   certainly don't have 80px worth of padding on that element ...

   Rob.

   On Jan 30, 7:45 pm, Eric Garside gars...@gmail.com wrote:

Different box models. I'd read up more on the difference between the
IE/FF box models to point you in the right direction. I'd give you a
quick tutorial, but I get out at 3 on Fridays! :D

On Jan 30, 1:52 pm, rob303 rob.cub...@googlemail.com wrote:

 Hi,

 I've been working on this for days.  The chaps on IRC couldn't find an
 answer so I thought I'd post it here just in case anyone knows what's
 going on.

 I have a basic accordion type feature.  The designer wants to be able
 to open more than one of hidden the sections at once ...

 So, here is my code:

 $(.accordion .accordion_header).click(function() {
     if($(this).hasClass('accordion_selected')) {
           $(this).removeClass('accordion_selected').next().slideUp
 ({duration: 'slow', easing: 'easeInOutQuad'});
         } else {
           $(this).addClass('accordion_selected').next().slideDown
 ({duration: 'slow', easing: 'easeInOutQuad'});
         }
   }).next().hide();

 .accordion {
   width: 97%;
   list-style-type: none;

 }

 .accordion_header {
   display: block;
   height: 20px;
   background: url(../images/bgd_accordion_off.gif) repeat-x;
   padding: 5px 10px 0 10px;

 }

 .accordion_header:hover {
   background: url(../images/bgd_accordion_on.gif) repeat-x;
   color: #d7d7d9;

 }

 .accordion_selected {
   background: url(../images/bgd_accordion_on.gif) repeat-x;
   color: #d7d7d9;

 }

 .accordion_section {
   display: block;
   line-height: 20px;
   padding: 0 10px 0 10px;

 }

 ul class=accordion
   li
     a href=javascript:; class=accordion_headerheading/a
     div class=accordion_section
       A bunch of text
     /div
   /li
 /ul

 The problem I face is that the content within the hidden div
 (accordion_section) is db driven so I have no idea what content to put
 in there.  This means I cannot fix the height of those divs.  This in
 turn breaks the animate on the slideDown function.  If I set the
 height of the div the animate is perfect.  Without it everythings all
 jumpy and broken looking.  So I figured that all I needed to do was to
 get the height of the hidden div and then apply it using  a css()
 call.  This works fine in IE but Firefox doesn't seem able to give me
 the correct height for the div.  For example if I use this code:

 var h = $(this).next().height();
 alert(h);

 IE gives me 240 - which correct for that particular div.  But firefox
 gives 160 for the same div! Anyone know why?

 Many thanks in advance for any help.

 Rob.


[jQuery] Re: $(this).ready with images

2009-01-31 Thread frederik.r...@gmail.com

Ok! That's great! Thanks for the explanation!


[jQuery] new plugin version debug

2009-01-31 Thread diego

Hi all, if you have just few minutes, i need help to debug  the script
for the 1.1 version of pirobox.
It works with jQuery 1.3.1 and also, obviously with 1.2.6.
here is the link
http://www.pirolab.it/demo/index_b.html
any advice will be welcome
tnx in advance to all

Diego Valobra


[jQuery] Re: Superfish

2009-01-31 Thread Nguyễn Quốc Vinh

I think the issue is more simple than you though!
This
http://www.stcyril.net/site/templates/rhuk_milkyway/images/normal_bg.png
is missing! And you are missing other images! Example:
mw_menu_normal_bg.png,...

Please go to line 42 in green.css and put a correct path, i tried to
put a correct path with Firebug and it works!
Try to put a absolute URL first...



2009/1/31 bklyn2cali s...@mediajelly.com:

 Hi,

 I'm setting up my first Joomla site and had a request to add drop down
 menus. I located Superfish and installed it. Simple, clean, no
 problems. But wait...

 It all works well, except for the fact that there is no background
 image or color on the dropdown items.  I cannot seem to address the
 background of the list items. All are ignored in the superfish.css
 file. The odd thing is that the drop shadow shows up if I opt it. And
 the direction arrows work fine too. I don't know why the bg does not.

 Here's the code that I'm changing that has no effect:

  .sf-menu li {
background: #BDD2FF;  /* this is the superfish default 
 that does not
 appear
background: url('../images/normal_bg.png') 0 0 repeat-x;  /*ths is
 the bg image that does not appear
 }
 .sf-menu li li {
background: #AABDE6;
background: url('../images/normal_bg.png') 0 0 repeat-x;
 }
 .sf-menu li li li {
background: #9AAEDB;
background: url('../images/normal_bg.png') 0 0 repeat-x;
 }
 .sf-menu li:hover, .sf-menu li.sfHover,
 .sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active {
background: #CFDEFF;
background: url('../images/normal_bg.png') 0 0 repeat-x;
outline:0;
 }


 I've been lost many hours on this one and cannot solve it. Can someone
 take a look and see what I'm doing incorrectly? The site is
 http://www.stcyril.net/site/

 Thanks in advance.




-- 
ku...@urbanjar.info
/
* Người ta thưởng chỉ chú ý đến những kẻ lên như diều gặp gió! Nhưng
hỡi ôi, chỉ có cát, bụi và lông hồng mới là những thứ lên nhanh nhất
*/


[jQuery] Re: Triggering a link with no click event

2009-01-31 Thread Ricardo Tomasi

I'm not sure, but I think click() will only fire the events bound with
jQuery itself. RokBox seems to be based on mootools, have you tried
the mootools way?

$('test').fireEvent('click');

Also, are you sure you're not having conflicts between jQuery and
mootools? Which one is using the caret symbol ($)? Best would be to
stick to a single library, as you'll have overlapping functionality
(longer download times) and the possibility of problems like this.

On Jan 31, 5:38 am, Andy789 e...@abcstudio.com.au wrote:
 As I can see quite many posts on this subject I wanted to explain why
 I need this. I generate links for RokBox modal window - something like

 a id=test href=flash/pdfs/test.html rel=rokboxtest/a

 next, I need to trigger these links from jscript function (from the
 external flash application). I could not figure out the way how to
 call RokBox directly and have to finc out the way how to trigger links
 via jquery or mootools or whatsoever.

 Any suggestions?


[jQuery] Re: appendingTo a just created element

2009-01-31 Thread Ricardo Tomasi

Do you use Firebug? First check if the element has been really
inserted to the DOM.

$('div/')
 .attr('id', 'someID')
 .insertBefore(elm);

alert( $('#someID').length );
// console.info( $('#someID').length );

I'm sure if you post a full test case at jsbin.com or somewhere else
on-line your problem will be spotted in no time!

On Jan 31, 12:59 pm, Nicky nha...@gmail.com wrote:
 Ah, very sorry about that mistype, but that is in fact what I am doing
 (just replaced my code wrong when I changed what I have to 'someID')

 Here's what I have, exactly:

         $('div/')
                 .attr('id', 'ntww-'+serial)
                 .insertBefore(elm);
         $('p/')
                 .appendTo('#ntww-'+serial);

 Sorry about that and thanks for the reply!

 -Nicky

 On Jan 31, 9:28 am, Stephan Veigl stephan.ve...@gmail.com wrote:

  the selector for an id is #, sou you should use #someID instead of
  someID for the appendTo() function.

  by(e)
  Stephan

  2009/1/31 Nicky nha...@gmail.com:

   Hi All,

   I'm fairly new to jQuery so I apologize if I'm missing something
   straightforward but doing this:

   $('div/')
          .attr('id', 'someID')
          .insertBefore(elm);
   $('p/')
          .appendTo('someID');

   Seems to give me errors. If I change appendTo('someID') to a
   different element's ID, it works fine, so I get the feeling that it
   can't append to the just-created div. Is this not the case? What
   should I do to move forward?

   Thanks for the help!


[jQuery] Re: Using $_POST to transmit large key/pair

2009-01-31 Thread Beres Botond


key=pair within the URL will always be GET parameter, no matter what
you do or what you use ($.post, $.get, $.ajax, $.load, etc.)

POST has nothing to do with the URL.


On Jan 31, 2:26 am, Mark Livingstone namematters...@msn.com wrote:
 ah, I thought that { key : pair } was just a replacement for
 key=pair...

 On Jan 30, 2:25 pm, Beres Botond boton...@gmail.com wrote:

  As shown in the docs (link I gave you), it should work

  $.post(order_send_email.php,
         {order_message : order_message}, // {key : variable}
         function(data)
           {
           alert(data);
           // do something
           });

  On Jan 30, 4:03 pm, Mark Livingstone namematters...@msn.com wrote:

   Thanks, Beres.

   I am reading this order_message from a DIV. How do I 'POST' it? By
   using form?

   Also, to url encode... do I use escape()?

   On Jan 30, 3:08 am, Beres Botond boton...@gmail.com wrote:

You want to use POST, but you are sending your data as GET (without
url encoding).
So I'm pretty sure it cuts before #, because # is a non-alphanumeric
character and you haven't urlencoded your data.

Data in URL  = GET, not POST, even if you are using $.post .

   http://docs.jquery.com/Post

So either urlencode your data before putting it in the request or send
it as POST.

Also I'm not sure how it worked for you on server-side, if you were
expecting $_POST... I assume you were expecting
$_REQUEST instead, which is not a good idea in my opinion.

On Jan 30, 8:08 am, Mark Livingstone namematters...@msn.com wrote:

 I have the following code:

 $.post(order_send_email.php?order_message='+order_message)

 my 'order_message' is:

 'Dear '+data['salutation']+ +data['first_name']+ 
 +data['last_name']
 +', \n\nThis is to inform you that your order #'+key+ and payment in
 the amount of...';

 When using $.POST... the message gets cut before #. Is there a limit
 on how much cam be transmitted or am I doing something wrong?

 Thanks.- Hide quoted text -

- Show quoted text -- Hide quoted text -

  - Show quoted text -


[jQuery] Re: Selecting form ID from $(this)

2009-01-31 Thread Ricardo Tomasi

$(#[$.variables.formID]) - that is a plain string, and there is no
need for the brackets. You probably meant to use

$(#+$.variables.formID).append(...)

But it's much easier to save the current form itself, instead of it's
ID:

$('[id^=credit]').change(function() {
   var $self = $(this);
  $.ajax({
 type: POST,
 url: /credits/edit,
 data: $self.serialize(),
 beforeSend: function(){
$self.append(divYAY/div);
},
success: function(html) {
   //...
} //make sure you don't have a comma after the last object, syntax
error
  })

On Jan 31, 5:32 am, frodosghost jamesmon...@gmail.com wrote:
 Howdy Guys,
 A bit of a problem I have been struggling with for a number of hours,
 and some help would go a long way.

 Its not really a problem with the $.ajax() function. It is more a
 problem with selecting live variables on the fly. I have multiple
 forms on one page, so selecting that one form to use and update data
 is what I am looking at doing.

 $.variables = {}; //Sets up an array so I can call the vars in which
 ever function I'd like to.

 $('[id^=credit]').change(function() {
   $.variables = {formID : $(this).attr('id')}; // Meant to pass the
 id, but passes an object.
   $.ajax({
     type: POST,
     url: /credits/edit,
     data: $(this).serialize(),
     beforeSend: function(){
       $(#[$.variables.formID]).append(YAY); //Just to put
 something in this form id.
       console.log($( [$.variables.formID] )); // Returns this in the
 console: Object length=1 0=credit1 jquery=1.3.1
     },
     success: function(html) {},
   })

 So I have set the variable.formID after the .change function. It
 passes an object, but I am looking at passing the actual id, so that I
 can put some data into that form id...

 If I use this $(#[$.variables.formID][0]).append(YAY); code in the
 first line of the before send (in an effort to get to the [0] in the
 object it passes, it updates all forms on the page with the .append.
 But it only sends the data from that one form.

 Because there is a number of forms on this one page, I'd just like to
 be able to select the id for the form, so I can update data in that
 form - At this stage I can get data into any form with an ID, but not
 the form that has been used.

 Am I missing something? I could have completely stuffed up how to do
 it. Any tips would be welcome.

 Thanks


[jQuery] Re: Having a problem with checkboxes

2009-01-31 Thread Beres Botond

Yes you can use : input type=checkbox name=paradigm[]
value={$value.ver_id} /

Just modify your jquery code as well:

var checked_status=this.checked;$(input[name^='paradigm']).each
(function(){
this.checked=checked_status;
});

http://docs.jquery.com/Selectors/attributeStartsWith#attributevalue




On Jan 31, 12:48 am, James james.gp@gmail.com wrote:
 Which version of Jquery are you using?
 From version 1.3 on has the @ in selectors deprecated, so the
 following is not valid anymore:
 $(inp...@name=paradigm])

 Just remove the @.

 http://docs.jquery.com/Release:jQuery_1.3#Upgrading

 On Jan 30, 5:27 am, heohni heidi.anselstet...@consultingteam.de
 wrote:

  Hi,

  I am using this:

  input type=checkbox name=paradigm value={$value.ver_id} /

  $(document).ready(function(){
          $(#paradigm_all).click(function(){
                  var 
  checked_status=this.checked;$(inp...@name=paradigm]).each
  (function(){
                          this.checked=checked_status;
                  });
          });

  });

  to check and uncheck a list of articles.
  Now I want to sumbit the checked articles, but I don't know how to do
  that.

  I can't use input type=checkbox name=paradigm[]
  value={$value.ver_id} /
  as then the jquery doesn#t work anymore.

  But how can I transfer all checked Id's to the next page?
  Any help?

  Thanks a bunch!


[jQuery] Re: plugins.jquery.com does not have 1.3.x

2009-01-31 Thread Ariel Flesler

Ping Mike Hostetler about this. I told him about this and he did
indeed added it. Maybe he forgot to add it somewhere else...

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

On Jan 30, 1:29 pm, Mika Tuupola tuup...@appelsiini.net wrote:
 When submitting a new plugin or plugin release there is no 1.3.x  
 option in the plugins.jquery.com pulldown. Can someone add it?

 --
 Mika Tuupolahttp://www.appelsiini.net/


[jQuery] Re: jquery and minify

2009-01-31 Thread Ariel Flesler

You should keep the headers somewhere, preferably close to the code.
Something like this:

/**
 * jQuery
 */
(function($){...});
/**
 * Plugin 1
 */
(function($){...});
/**
 * Plugin 2
 */
(function($){...});

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

On Jan 29, 10:53 pm, Sam Sherlock sam.sherl...@gmail.com wrote:
 Having just seen this sitehttp://www.highpointvillage.co.uk; running it
 through yslow (it got an f 50/100), one way to improve it would be reducing
 the http requests - but:-

 Would combining the scripts on a site like this with minify be contrary to
 the license of jQuery?
 could jquery be minifed in a file with the comment header retained at the
 top of combined file?
 or would one have to have a jquery.js file minified with comment header
 intact and combine the plugins?


[jQuery] Re: Superfish Dropdown BG Problem

2009-01-31 Thread levine....@gmail.com

Thanks Joel,

I was the other guy a few days ago.

Does this code snippet go into the superfish.css file???

With regards,
Ron

On Jan 31, 6:08 am, Joel Birch joeldbi...@gmail.com wrote:
 Hello,

 This is the exact same issue someone else had just the other day, and
 they were also a Joomla user. Your problem is figure out by selecting
 the menu li element using Firebug. The Superfish background rule is
 being overridden by the #pillmenu li li rule which is in the green.css
 file. The reason this rule gets precedence over the Superfish CSS is
 because it uses an id in the selector, which trumps the .sf-menu class
 selector.

 Interestingly, 'pillmenu' was the exact same id that was involved with
 the other Joomla user's issue, so I assume it must be part of Joomla's
 templates. Solve your problem by adding the id to your Superfish
 selector in order to increase its 'specificity', like this:

 #pillmenu .sf-menu li { background: #BDD2FF url('../images/
 normal_bg.png') repeat-x 0 0; }

 Joel Birch.


[jQuery] Re: slideViewer v1.1 + Tooltip v1.3 + jQuery v1.3.1 = tooltips fail

2009-01-31 Thread Jörn Zaefferer

Could you give the latest revision a try? It seems to work fine with
core 1.3: http://jqueryjs.googlecode.com/svn/trunk/plugins/tooltip/

Jörn

On Thu, Jan 29, 2009 at 4:52 PM, Matt matthew.c.wag...@gmail.com wrote:

 I have a little demo up to check out.

 http://jquery.oniegirl.com/svw/

 (the pictures are not mine, just re-using one of the demos from the
 slideviewer site)


 2 versions:
 
 the first works (using jQuery 1.2.6, easing 1.3, OLD tooltip plugin,
 slideviewer 1.1)

 the second does not (using jQuery 1.3.1, easing 1.3, tooltip 1.3,
 slideviewer 1.1)



 Can someone help me debug the problem? Thanks a bunch



[jQuery] Re: slideViewer v1.1 + Tooltip v1.3 + jQuery v1.3.1 = tooltips fail

2009-01-31 Thread Matt

Jörn,

Thanks for the response, and I agree that tooltips by themselves work
fine with your plugin.

I have the latest version in use, but for some reason it still does
not work. (The proper div with id=tooltip gets inserted, but nothing
happens on hover)
http://jquery.oniegirl.com/svw/broken.htm

(Quick note: I had to modify the slideViewer plugin, line 54 from
Tooltip to tooltip for the div to get inserted properly)

Maybe something else is case-sensitive somewhere in there?


Or perhaps it's the way I'm calling it? Here's what I'm using:

$(window).bind(load, function() {
$(div#gallery).slideView({
easeFunc: easeOutBounce,
easeTime: 500,
toolTip: true
});
});

Does the load order matter? Mine is:
1. jQuery 1.3.1
2. easing plugin
3. Tooltip 1.3
4. slideViewer 1.1


Matt


On Jan 31, 12:10 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com
wrote:
 Could you give the latest revision a try? It seems to work fine with
 core 1.3:http://jqueryjs.googlecode.com/svn/trunk/plugins/tooltip/

 Jörn

 On Thu, Jan 29, 2009 at 4:52 PM, Matt matthew.c.wag...@gmail.com wrote:

  I have a little demo up to check out.

 http://jquery.oniegirl.com/svw/

  (the pictures are not mine, just re-using one of the demos from the
  slideviewer site)

  2 versions:
  
  the first works (using jQuery 1.2.6, easing 1.3, OLD tooltip plugin,
  slideviewer 1.1)

  the second does not (using jQuery 1.3.1, easing 1.3, tooltip 1.3,
  slideviewer 1.1)

  Can someone help me debug the problem? Thanks a bunch




[jQuery] Re: Large images IE ready event

2009-01-31 Thread Karl Swedberg

Hi Alex,

Which version of jQuery are you using? If it's 1.3.1, there was a  
regression that caused this problem.


This has been fixed in the svn version. See the bug report here:

http://dev.jquery.com/ticket/3988

--Karl


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




On Jan 30, 2009, at 10:19 AM, Alex wrote:



In IE 6 through 8, whenever I use $(document).ready(function(){ });,
it doesn't get triggered if there are still images trying to load. I
use a graphic engine to draw huge graphs and it can take up to 5
seconds parsing the images and the code between the ready event doesnt
get triggered until the images are fully loaded.

It works flawlessly in Firefox. Only IE6-8 has this problem. Is there
something I am missing in my code? Is this a known issue with IE?

Thanks.




[jQuery] Trigger Problem? (tablesorter)

2009-01-31 Thread Eric

Hello everyone!!

i'm learning and doing a control panel in PHP + Ajax..

i used some plugins:

script type=text/javascript src=../er.extra/jquery-latest.js/
script
script type=text/javascript src=../er.extra/
jquery.tablesorter.js/script
script type=text/javascript src=../er.extra/
jquery.tablesorter.pager.js/script
script type=text/javascript src=../er.extra/
jquery.columnfilters.js/script

it's all right, but when i add, remove or edit some row it didn't
update!

i used $(table).trigger('stripe'); to update but nothing happened!!

can anyone help me???
xD

thanks!!


[jQuery] Making Web Game- Need Hitpoint XP histogram/line graph

2009-01-31 Thread TrixJo

Hi there, I have been using Yahoo UI for the past couple of years and
finally jumped ship and have come over to JQuery mainly because of all
of the amazing things I am seeing!

I am making a simple web game.  Users can level their avatars and
engage in combat.

Therefore, I require a horizontal histogram for the player's health
meter and XP meter.

Stats are stored in mySQL (LAMP)

I have googled for a number of plugins and haven't been able to find a
simple one that allows for horizontal line bars for the situation I
require.

Anyone know of any?

thanks


[jQuery] Need help validating a dropdown list

2009-01-31 Thread Kathryn

Hi all,

I'm using the fantastic validation plugin (from bassistance.de) and
have run into a little glitch. I understand the plugin doesn't
currently handle dropdowns, but I found a possible solution on True
Tribe (http://www.thetruetribe.com/jquery/1-jquery-api/68-jquery-
plugin-validation-with-ajax). I can't get it to work, though. I'm
pretty new to jQuery and am probably making an obvious error I can't
see. Here's my jQuery code:

$(document).ready(function(){
$(#reg_form).validate({

onfocusout: false,
onkeyup: false,
onclick: false,

rules: {
gender: {required:true},
spouse_attend: {required:true}
}

   });

$validator.addMethod(
select_class,
function(value, element) {
return this.optional(element) || ( value.indexOf(--Select One--) ==
-1);
},
Please select a class.);

});

And here's the dropdown I'm trying to validate.

select name='class_date' id='class_date' class='select_class'
option value='--Select One--'--Select One--/option
optionFeb 16 - 20, 2009/option
optionMar 16 - 20, 2009/option
optionApr 13 - 17, 2009/option
optionMay 11 - 15, 2009/option
/select

What am I doing wrong? Or is there another way to do this?

Thanks in advance!

Kathryn


[jQuery] getElementById with ajax

2009-01-31 Thread efet

This will be my first application with using jQuery library, so I
might not make sense. I will try to explain what I want to do as
simple as possible.

I have two web pages, index.asp, ship.asp.

index.asp: I have a form with ReceiverPostalCode and ReceiverCountry
inputs.
ship.asp: this is where I submit form inputs from index.asp to receive
shipping quotes.

For example, I get quotes at
ship.asp?ShippingPostalCode=02116ShippingCountry=US

When customer enters ReceiverPostalCode and ReceiverCountry on
index.asp, I want quotes immediately appear in index.asp. How do I do
this basing my codes on jQuery?


[jQuery] Re: Click Links in the Nnavigation Bar

2009-01-31 Thread Pedram

I'm looking to improve the performance ,  which of these 2 codes has
the best performance.

On Jan 30, 1:04 am, Nic Luciano adaptive...@gmail.com wrote:
 What exactly are you trying to do, what is the issue? Maybe just preference
 here (and I'm also just guessing what you're asking) but I don't see a
 reason not to put the events on the elements themselves

 $(ul li a).click(function() {
         $(this).parent().parent().find(.active).removeClass(active);
         $(this).addClass(active);
     });

 On Fri, Jan 30, 2009 at 3:07 AM, Pedram pedram...@gmail.com wrote:

  Dear Karl ,
  I know You are Expert in these Issues do you have any idea for me
  Thanks

  On Jan 29, 5:44 pm, Pedram pedram...@gmail.com wrote:
   Hi Folks ,
     I have some links in my Navigation bar such as below , I Used FIND
   in my code , does anyone has any better solution for me ,
     I also used Event Delegation in the system .

   ul
     lia href=# class=activea/a/li
     lia href=#b/a/li
     lia href=#c/a/li
     lia href=#d/a/li
   /ul

     $(ul).bind(click,function(e){
         var clicked=$(e.target);
         $(this).find(a.active).removeClass(active);
         clicked.addClass(active);
     });


[jQuery] Re: Click Links in the Nnavigation Bar

2009-01-31 Thread Karl Swedberg

Hi Pedram,

I agree with Nic. Especially if you're only dealing with 4 elements,  
binding directly on them seems like the most sensible solution.


Are you noticing performance problems? You shouldn't be seeing any,  
with scripts this basic. In any case, there are a couple selector  
optimizations you could implement, if necessary. Something like this:


var $navBarLinks = $('#your-nav-bar-id a');

$navBarLinks.click(function() {
  $navBarLinks.removeClass('active');
  $(this).addClass('active');
});

--Karl


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




On Jan 31, 2009, at 2:36 PM, Pedram wrote:



I'm looking to improve the performance ,  which of these 2 codes has
the best performance.

On Jan 30, 1:04 am, Nic Luciano adaptive...@gmail.com wrote:
What exactly are you trying to do, what is the issue? Maybe just  
preference
here (and I'm also just guessing what you're asking) but I don't  
see a

reason not to put the events on the elements themselves

$(ul li a).click(function() {
$ 
(this).parent().parent().find(.active).removeClass(active);

$(this).addClass(active);
});

On Fri, Jan 30, 2009 at 3:07 AM, Pedram pedram...@gmail.com wrote:


Dear Karl ,
I know You are Expert in these Issues do you have any idea for me
Thanks



On Jan 29, 5:44 pm, Pedram pedram...@gmail.com wrote:

Hi Folks ,
  I have some links in my Navigation bar such as below , I Used  
FIND

in my code , does anyone has any better solution for me ,
  I also used Event Delegation in the system .



ul
  lia href=# class=activea/a/li
  lia href=#b/a/li
  lia href=#c/a/li
  lia href=#d/a/li
/ul



  $(ul).bind(click,function(e){
  var clicked=$(e.target);
  $(this).find(a.active).removeClass(active);
  clicked.addClass(active);
  });




[jQuery] Re: plugins.jquery.com does not have 1.3.x

2009-01-31 Thread Karl Swedberg

Thanks, Ariel. I've also been in touch with Mike about this.

Mika, it seems 1.3.x appears when you create a new project, but not  
when you add a release to an existing one. I'm sure Mike will get to  
the bottom of it and fix it soon. I'll post again here as soon as I  
see it has been fixed (unless someone else beats me to it).


--Karl


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




On Jan 31, 2009, at 12:02 PM, Ariel Flesler wrote:



Ping Mike Hostetler about this. I told him about this and he did
indeed added it. Maybe he forgot to add it somewhere else...

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

On Jan 30, 1:29 pm, Mika Tuupola tuup...@appelsiini.net wrote:

When submitting a new plugin or plugin release there is no 1.3.x
option in the plugins.jquery.com pulldown. Can someone add it?

--
Mika Tuupolahttp://www.appelsiini.net/




[jQuery] Re: 1.3 and toggle()

2009-01-31 Thread gmacgregor

On Jan 30, 7:08 pm, John Resig jere...@gmail.com wrote:
 It looks like you're trying to use a jQuery UI effect - maybe that's why?

Thanks John. Forgive my ignorance, but how does jQuery know that
you're calling the toggle() UI effect as opposed to the toggle() core
effect? For example:

// toggle UI
$(p).click(function () {
$(div).toggle(slide, {}, 1000);
});

// toggle core
$(button).click(function () {
$(p).toggle(slow);
});



[jQuery] Re: getElementById with ajax

2009-01-31 Thread gmacgregor

On Jan 31, 12:55 pm, efet efetun...@gmail.com wrote:
 When customer enters ReceiverPostalCode and ReceiverCountry on
 index.asp, I want quotes immediately appear in index.asp. How do I do
 this basing my codes on jQuery?

Assuming ship.asp returns some kind of value, you simply make a Ajax
request to ship.asp and do what you will with the response in
index.asp. Probably best to read up on both Ajax and jQuery's Ajax
implementation:

https://developer.mozilla.org/en/AJAX
http://docs.jquery.com/Ajax

Good luck!


[jQuery] Re: Making Web Game- Need Hitpoint XP histogram/line graph

2009-01-31 Thread seasoup

flot

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



On Jan 31, 7:06 am, TrixJo tri...@gmail.com wrote:
 Hi there, I have been using Yahoo UI for the past couple of years and
 finally jumped ship and have come over to JQuery mainly because of all
 of the amazing things I am seeing!

 I am making a simple web game.  Users can level their avatars and
 engage in combat.

 Therefore, I require a horizontal histogram for the player's health
 meter and XP meter.

 Stats are stored in mySQL (LAMP)

 I have googled for a number of plugins and haven't been able to find a
 simple one that allows for horizontal line bars for the situation I
 require.

 Anyone know of any?

 thanks


[jQuery] $.ajax Feed Aggregator

2009-01-31 Thread anthonyb

I was curious if someone could help me manipulate some code. Im still
pretty new to jQuery and this is over my head.

$(function() {

$.ajax({
type: GET,
url: http://www.msn.com/rss/alsoonmsn.aspx;,
dataType: xml,
success: function(rss) {
strRSS = h4 + $(/rss/channel/title,rss).text() + /
h4;
$(/rss/channel/item/title:lt(5),rss).each(function(i) {
strRSS += lia href=';
strRSS += $(/rss/channel/item/link:eq( + i +
),rss).text();
strRSS += ';
strRSS += $(this).text();
strRSS += /abr /;
strRSS += ($(/rss/channel/item/description:eq( + i +
),rss).text()).substring(0,200) + .../li;
});
$(#feed_me).html(strRSS);
}
});

});

Pretty much what im trying to do is have it to where the li has
something like this: li onclick=location.href='storyurlhere';

Thanks a million.


[jQuery] RSS Feed Aggregator with $.ajax

2009-01-31 Thread anthonyb

Hello

I was curious if someone could help me with the output of a feed
aggregator Im trying to use.

Right now the feed displays the content in a series of list items with
the link to read the article attached to a href. What I would like to
happen, is take the link to the rss story, and attach it to the list
item itself using location.href.


Here is the current code for the feed aggregator:

$(function() {

$.ajax({
type: GET,
url: http://www.msn.com/rss/alsoonmsn.aspx;,
dataType: xml,
success: function(rss) {
strRSS = h4 + $(/rss/channel/title,rss).text() + /
h4;
$(/rss/channel/item/title:lt(5),rss).each(function(i) {
strRSS += lia href=';
strRSS += $(/rss/channel/item/link:eq( + i +
),rss).text();
strRSS += ';
strRSS += $(this).text();
strRSS += /abr /;
strRSS += ($(/rss/channel/item/description:eq( + i +
),rss).text()).substring(0,200) + .../li;
});
$(#feed_me).html(strRSS);
}
});

});

Thanks,
Anthony


[jQuery] Re: Getting the height of a hidden div in Firefox

2009-01-31 Thread Ricardo Tomasi

jQuery should be doing that by default, line 733 of core.js:

var val, props = { position: absolute, visibility: hidden,
display:block }
  if ( jQuery(elem).is(:visible) )
getWH();
else
   jQuery.swap( elem, props, getWH ); //apply 'props' briefly to get
the correct values

Could you post a test page exhibiting this issue? That might be a bug.

On Jan 31, 1:14 pm, rob303 rob.cub...@googlemail.com wrote:
 Hi Tommy,

 Many thanks.  That's exactly what I came up with over night.

 $(this).next().css('display', 'block');
 var h = $(this).next().height();
 $(this).next().hide();
 $(this).addClass('accordion_selected').next().height(h).slideDown
 ({duration: 700, easing: 'easeInOutQuad'});

 Gives me the correct height in FF and it happens so fast that the div
 isn't shown.  The slideDown is now perfectly smooth in both browsers.

 Cheers,

 Rob.

 On Jan 31, 3:04 pm, omtay38 omta...@gmail.com wrote:

  I know its probably not the best solution, but what if you showed the
  div just long enough to get the height, hid it again and then slid it
  down. You could prevent the div from actually showing by giving it
  something like .css(left,-1px) before using .show(). Just a
  thought.

  Tommy

  On Jan 30, 2:00 pm, rob303 rob.cub...@googlemail.com wrote:

   Oh, one other thing.  If I call .css('display', 'block') on the
   element before using height() FF gives me the correct value of 240px.
   Obviously, that breaks the accordion because I want the element
   hidden!

   /me scratches head ...

   Rob.

   On Jan 30, 7:57 pm, rob303 rob.cub...@googlemail.com wrote:

Thanks for the reply Eric.  But what have different box models got to
do with it? I'm not setting any border or padding properties on my
hidden div that would effect the height.  And the difference between
the two browsers is huge.  IE says 240px and FF says 160px.  I
certainly don't have 80px worth of padding on that element ...

Rob.

On Jan 30, 7:45 pm, Eric Garside gars...@gmail.com wrote:

 Different box models. I'd read up more on the difference between the
 IE/FF box models to point you in the right direction. I'd give you a
 quick tutorial, but I get out at 3 on Fridays! :D

 On Jan 30, 1:52 pm, rob303 rob.cub...@googlemail.com wrote:

  Hi,

  I've been working on this for days.  The chaps on IRC couldn't find 
  an
  answer so I thought I'd post it here just in case anyone knows 
  what's
  going on.

  I have a basic accordion type feature.  The designer wants to be 
  able
  to open more than one of hidden the sections at once ...

  So, here is my code:

  $(.accordion .accordion_header).click(function() {
      if($(this).hasClass('accordion_selected')) {
            $(this).removeClass('accordion_selected').next().slideUp
  ({duration: 'slow', easing: 'easeInOutQuad'});
          } else {
            $(this).addClass('accordion_selected').next().slideDown
  ({duration: 'slow', easing: 'easeInOutQuad'});
          }
    }).next().hide();

  .accordion {
    width: 97%;
    list-style-type: none;

  }

  .accordion_header {
    display: block;
    height: 20px;
    background: url(../images/bgd_accordion_off.gif) repeat-x;
    padding: 5px 10px 0 10px;

  }

  .accordion_header:hover {
    background: url(../images/bgd_accordion_on.gif) repeat-x;
    color: #d7d7d9;

  }

  .accordion_selected {
    background: url(../images/bgd_accordion_on.gif) repeat-x;
    color: #d7d7d9;

  }

  .accordion_section {
    display: block;
    line-height: 20px;
    padding: 0 10px 0 10px;

  }

  ul class=accordion
    li
      a href=javascript:; class=accordion_headerheading/a
      div class=accordion_section
        A bunch of text
      /div
    /li
  /ul

  The problem I face is that the content within the hidden div
  (accordion_section) is db driven so I have no idea what content to 
  put
  in there.  This means I cannot fix the height of those divs.  This 
  in
  turn breaks the animate on the slideDown function.  If I set the
  height of the div the animate is perfect.  Without it everythings 
  all
  jumpy and broken looking.  So I figured that all I needed to do was 
  to
  get the height of the hidden div and then apply it using  a css()
  call.  This works fine in IE but Firefox doesn't seem able to give 
  me
  the correct height for the div.  For example if I use this code:

  var h = $(this).next().height();
  alert(h);

  IE gives me 240 - which correct for that particular div.  But 
  firefox
  gives 160 for the same div! Anyone know why?

  Many thanks in advance for any help.

  Rob.


[jQuery] Re: appendingTo a just created element

2009-01-31 Thread Nicky

Hi All,

Thanks for the great responses, jsbin is great. I've figured out the
problem and things seem to be working smoothly at the moment.

If I may, let me ask another related question:

Ultimately, this script is writing a web widget to a page. Is there an
easier way to be writing large amounts of code to a page through
javascript/jQuery without foregoing the DOM or is this pretty much my
best option?

Thanks again,
Nicky

On Jan 31, 1:47 pm, Stephan Veigl stephan.ve...@gmail.com wrote:
 Hi Nicky,

 where do the variables elm, and serial come from?

 Your posted code snipped looks ok, and it's working fine if you
 populate the elm and serial with meaningful values. (see 
 example:http://jsbin.com/oxehe/edit)

 I guess there is a problem with elm. Are you sure it holds exactly 1
 DOM element?
 Is serial a unique ID?

 by(e)
 Stephan

 2009/1/31 Nicky nha...@gmail.com:



  Ah, very sorry about that mistype, but that is in fact what I am doing
  (just replaced my code wrong when I changed what I have to 'someID')

  Here's what I have, exactly:

         $('div/')
                 .attr('id', 'ntww-'+serial)
                 .insertBefore(elm);
         $('p/')
                 .appendTo('#ntww-'+serial);

  Sorry about that and thanks for the reply!

  -Nicky

  On Jan 31, 9:28 am, Stephan Veigl stephan.ve...@gmail.com wrote:
  the selector for an id is #, sou you should use #someID instead of
  someID for the appendTo() function.

  by(e)
  Stephan

  2009/1/31 Nicky nha...@gmail.com:

   Hi All,

   I'm fairly new to jQuery so I apologize if I'm missing something
   straightforward but doing this:

   $('div/')
          .attr('id', 'someID')
          .insertBefore(elm);
   $('p/')
          .appendTo('someID');

   Seems to give me errors. If I change appendTo('someID') to a
   different element's ID, it works fine, so I get the feeling that it
   can't append to the just-created div. Is this not the case? What
   should I do to move forward?

   Thanks for the help!


[jQuery] Re: RSS Feed Aggregator with $.ajax

2009-01-31 Thread anthonyb

Ive been editing this a little bit and thought that what i have below
would work. but it doesn't.

$(function() {

$.ajax({
type: GET,
url: http://anthonyjamesbruno.com/blog/?feed=rss2;,
dataType: xml,
success: function(rss) {
strRSS = h4 + $(/rss/channel/title,rss).text() + /
h4;
$(/rss/channel/item/title:lt(5),rss).each(function(i) {
strRSS += li onClick='location.href=';
strRSS += $(/rss/channel/item/link:eq( + i +
),rss).text();
strRSS += ';';
strRSS += $(this).text();
strRSS += br /;
strRSS += ($(/rss/channel/item/description:eq( + i +
),rss).text()).substring(0,200) + .../li;
});
$(#feed_me).html(strRSS);
}
});

});


[jQuery] Re: Making Web Game- Need Hitpoint XP histogram/line graph

2009-01-31 Thread aquaone
you could also check out Raphael or Processing.

stephen


On Sat, Jan 31, 2009 at 13:16, seasoup seas...@gmail.com wrote:


 flot

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



 On Jan 31, 7:06 am, TrixJo tri...@gmail.com wrote:
  Hi there, I have been using Yahoo UI for the past couple of years and
  finally jumped ship and have come over to JQuery mainly because of all
  of the amazing things I am seeing!
 
  I am making a simple web game.  Users can level their avatars and
  engage in combat.
 
  Therefore, I require a horizontal histogram for the player's health
  meter and XP meter.
 
  Stats are stored in mySQL (LAMP)
 
  I have googled for a number of plugins and haven't been able to find a
  simple one that allows for horizontal line bars for the situation I
  require.
 
  Anyone know of any?
 
  thanks


[jQuery] Re: Triggering a link with no click event

2009-01-31 Thread Andy789

Guys, thank you, but it still does not work.

1) The Maurício's solution is just a way of extracting the href value
and creating onlick event to jump to that link. What I need is to
emulate a click on the a element without opening a link directly. The
reason for that: Rokbox scans all rel=rokbox elements and generates
a set of divs bevore closing body tag. Somehow the links are binded
with some internal RokBox functions, so clicking on the link opens a
RokBox with the link target inside.

2) Yes, I am using both mootools and jquery with noConflict()
declaration - it works perfectly

3) The problem is that I cannot find the function inside RokBox to
call it directly from jscript function. At the same time I would
rather prefer to use RokBox, because it works perfectly for complex
independent pages with ajax, flash etc inside. RokBox creates an
iframe inside.

The point is that I need to find either a way of emulating the link
click or a function inside RokBox, which is difficult, because it is
packed

any more ideas?


[jQuery] Re: slideViewer v1.1 + Tooltip v1.3 + jQuery v1.3.1 = tooltips fail

2009-01-31 Thread Matt

Not that this was a super hot topic, but IT WORKS NOW!

http://jquery.oniegirl.com/svw/works.htm

You can see the working version, plus a writeup on how I got it
working, etc. at that link.


Apparently there are key differences between $(window).bind and $
(document).ready

I cannot explain them, but the fix is easy enough for anyone else in
the same boat as I was. Check it out!



Matt



On Jan 31, 12:33 pm, Matt matthew.c.wag...@gmail.com wrote:
 Jörn,

 Thanks for the response, and I agree that tooltips by themselves work
 fine with your plugin.

 I have the latest version in use, but for some reason it still does
 not work. (The proper div with id=tooltip gets inserted, but nothing
 happens on hover)http://jquery.oniegirl.com/svw/broken.htm

 (Quick note: I had to modify the slideViewer plugin, line 54 from
 Tooltip to tooltip for the div to get inserted properly)

 Maybe something else is case-sensitive somewhere in there?

 Or perhaps it's the way I'm calling it? Here's what I'm using:

 $(window).bind(load, function() {
     $(div#gallery).slideView({
         easeFunc: easeOutBounce,
         easeTime: 500,
        toolTip: true
     });

 });

 Does the load order matter? Mine is:
 1. jQuery 1.3.1
 2. easing plugin
 3.Tooltip1.3
 4. slideViewer 1.1

 Matt

 On Jan 31, 12:10 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com
 wrote:

  Could you give the latest revision a try? It seems to work fine with
  core 1.3:http://jqueryjs.googlecode.com/svn/trunk/plugins/tooltip/

  Jörn

  On Thu, Jan 29, 2009 at 4:52 PM, Matt matthew.c.wag...@gmail.com wrote:

   I have a little demo up to check out.

  http://jquery.oniegirl.com/svw/

   (the pictures are not mine, just re-using one of the demos from the
   slideviewer site)

   2 versions:
   
   the first works (using jQuery 1.2.6, easing 1.3, OLDtooltipplugin,
   slideviewer 1.1)

   the second does not (using jQuery 1.3.1, easing 1.3,tooltip1.3,
   slideviewer 1.1)

   Can someone help me debug the problem? Thanks a bunch




[jQuery] Re: appendingTo a just created element

2009-01-31 Thread Nicky

Sorry, to be more specific by 'code' I mean HTML. :)

-Nicky

On Jan 31, 4:41 pm, Nicky nha...@gmail.com wrote:
 Hi All,

 Thanks for the great responses, jsbin is great. I've figured out the
 problem and things seem to be working smoothly at the moment.

 If I may, let me ask another related question:

 Ultimately, this script is writing a web widget to a page. Is there an
 easier way to be writing large amounts of code to a page through
 javascript/jQuery without foregoing the DOM or is this pretty much my
 best option?

 Thanks again,
 Nicky

 On Jan 31, 1:47 pm, Stephan Veigl stephan.ve...@gmail.com wrote:

  Hi Nicky,

  where do the variables elm, and serial come from?

  Your posted code snipped looks ok, and it's working fine if you
  populate the elm and serial with meaningful values. (see 
  example:http://jsbin.com/oxehe/edit)

  I guess there is a problem with elm. Are you sure it holds exactly 1
  DOM element?
  Is serial a unique ID?

  by(e)
  Stephan

  2009/1/31 Nicky nha...@gmail.com:

   Ah, very sorry about that mistype, but that is in fact what I am doing
   (just replaced my code wrong when I changed what I have to 'someID')

   Here's what I have, exactly:

          $('div/')
                  .attr('id', 'ntww-'+serial)
                  .insertBefore(elm);
          $('p/')
                  .appendTo('#ntww-'+serial);

   Sorry about that and thanks for the reply!

   -Nicky

   On Jan 31, 9:28 am, Stephan Veigl stephan.ve...@gmail.com wrote:
   the selector for an id is #, sou you should use #someID instead of
   someID for the appendTo() function.

   by(e)
   Stephan

   2009/1/31 Nicky nha...@gmail.com:

Hi All,

I'm fairly new to jQuery so I apologize if I'm missing something
straightforward but doing this:

$('div/')
       .attr('id', 'someID')
       .insertBefore(elm);
$('p/')
       .appendTo('someID');

Seems to give me errors. If I change appendTo('someID') to a
different element's ID, it works fine, so I get the feeling that it
can't append to the just-created div. Is this not the case? What
should I do to move forward?

Thanks for the help!


[jQuery] Selecting parent ID

2009-01-31 Thread Christoffer

Hi everyone,

I have a lot of tables, like this:

table id=stuff1trtdlorem/tdtdipsum/td/table
table id=stuff2trtdlorem2/tdtdipsum2/td/table

I want to loop through all td:s and select the id of the parent table. 
What is the best solution for that?

$('table td').each(function(){
// select the parent table id here
$('parenttable').attr(id);
});

Best regards,
Christoffer


[jQuery] Changing Tooltip style

2009-01-31 Thread apple

Hi,

I would like to change the tooltip style: making the font smaller with
a different color ; I tried changing the tooltip.css but it seems not
to work...

#tooltip {
position: absolute;
z-index: 3000;
background-color: #eee;
padding: 5px;
font-size:small; -
opacity: 0.85;
}


Please advice.

Thanks in advance


[jQuery] Selecting parent id

2009-01-31 Thread Chrille

Hi everyone,

I have a lot of tables, like this:

table id=stuff1trtdlorem/tdtdipsum/td/table
table id=stuff2trtdlorem2/tdtdipsum2/td/table

I want to loop through all td:s and select the id of the parent table.
What is the best solution for that?

$('table td').each(function(){
   // select the parent table id here
   $('parenttable').attr(id);
});

Best regards,
Christoffer


[jQuery] Re: Selecting parent ID

2009-01-31 Thread Karl Swedberg

If you want the id of the parent table, you can get it this way:

$(this).parents('table')[0].id


--Karl


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




On Jan 31, 2009, at 4:57 PM, Christoffer wrote:



Hi everyone,

I have a lot of tables, like this:

table id=stuff1trtdlorem/tdtdipsum/td/table
table id=stuff2trtdlorem2/tdtdipsum2/td/table

I want to loop through all td:s and select the id of the parent table.
What is the best solution for that?

$('table td').each(function(){
   // select the parent table id here
   $('parenttable').attr(id);
});

Best regards,
Christoffer




[jQuery] Re: Changing Tooltip style

2009-01-31 Thread donb

Specify a value, either absolute (such as 7px) or relative (such as
80% or .9em)

On Jan 31, 5:37 pm, apple quye...@yahoo.com wrote:
 Hi,

 I would like to change the tooltip style: making the font smaller with
 a different color ; I tried changing the tooltip.css but it seems not
 to work...

 #tooltip {
         position: absolute;
         z-index: 3000;
         background-color: #eee;
         padding: 5px;
         font-size:small;                     -
         opacity: 0.85;

 }

 Please advice.

 Thanks in advance


[jQuery] Re: Damn ie7!

2009-01-31 Thread Karl Swedberg

On Jan 30, 2009, at 5:06 PM, david.0pl...@gmail.com wrote:



Ok, thank you very much i got this!
Also, just to know is there any site/books that specifically 'speaks'
about the limitations of the various web browsers?


Yes, check out PPK's Quirksmode at http://www.quirksmode.org/


--Karl

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



[jQuery] BlockUI: multiple blocks

2009-01-31 Thread Jason

Hi all,
I'm using the BlockUI plugin with great success on my data table
that's asynchronously loading data via AJAX, when new data is being
loaded I'm visually overlaying the table (wrapped in a div) to let the
user know that data is being loaded and prevent manipulation of the
data in the table. What I'd really like to do is block user input on
the entire page but only draw the overlay and message on the table
portion. What's the best way to do this? Can I block the div as I am
now and still call $.blockUI with no message in order to block input
to the entire page, or will multiple invocations like this cause
issues?
Thanks,
Jason


[jQuery] jQuery and Javascript timer question

2009-01-31 Thread thertze...@gmail.com

What I'm trying to do is on click of a div spawn a
timer (setTimeout) which will run while the user is on the page, on
completion of the countedown of setTimeout, load a function to do a
submit. However in my testing the following code does not wait, and
submits the page event right away. Basically I want to be able to que
up the click events and then process them during an idle few seconds.

Check out my code below maybe you can help!

script type=text/javascript
var pixelid = new Array();
var pixelcolors = new Array();
var processTimerId = 0;
var counter = 0;
\$('#result').click(function(e) {
if ( \$(e.target).is('.btn px') )
{
var color = \$(input#color_code).val();
\$(this).css({ backgroundColor:color });
var id_select = \$(e.target).parent('div').attr('id');

pixelid[counter] = id_select;
pixelcolors[counter] = color;

if (counter == 0)
{
//They have not clicked before, so we are ready to 
start the
process timer
processTimerId = setTimeout (process_pixels(), 4000);
}
else
{
//They have clicked before, but apparently they clicked 
again, stop
the timer and we will restart it.
clearTimeout( processTimerId );
processTimerId = setTimeout (process_pixels(), 4000);
}
counter++;

}
});

function process_pixels(){

var process_counter = 0;

while (process_counter = counter)
{
\$(#result).load('/px_creator.pl', {colorselect: pixelcolors
[process_counter], id_select: pixelid[process_counter]});
process_counter++;
}
}
/script

Example: http://pixelated.hertzelle.com/draw.pl

Can anyone tell me why my timer process doesnt work as I would want it
to? I still have more work to go...But this has me a bit stuck. Any
help would make me very happy, thanks!


[jQuery] Re: jQuery and Javascript timer question

2009-01-31 Thread thertze...@gmail.com

I think i finally got it to work, changed all the setTimeout functions
to setInterval, now I just need to figure out why \$(this).css
({ backgroundColor:color });  isnt setting the color of the divs
instantly, as well as a new method call for .load (don't need to
reload everytime with client side color changes, and then finally I
need to tweet my timeout time. Thank you all for looking!

On Jan 31, 5:57 pm, thertze...@gmail.com thertze...@gmail.com
wrote:
 What I'm trying to do is on click of a div spawn a
 timer (setTimeout) which will run while the user is on the page, on
 completion of the countedown of setTimeout, load a function to do a
 submit. However in my testing the following code does not wait, and
 submits the page event right away. Basically I want to be able to que
 up the click events and then process them during an idle few seconds.

 Check out my code below maybe you can help!

         script type=text/javascript
 var pixelid = new Array();
 var pixelcolors = new Array();
 var processTimerId = 0;
 var counter = 0;
 \$('#result').click(function(e) {
         if ( \$(e.target).is('.btn px') )
         {
                 var color = \$(input#color_code).val();
                 \$(this).css({ backgroundColor:color });
                 var id_select = \$(e.target).parent('div').attr('id');

                 pixelid[counter] = id_select;
                 pixelcolors[counter] = color;

                 if (counter == 0)
                 {
                         //They have not clicked before, so we are ready to 
 start the
 process timer
                         processTimerId = setTimeout (process_pixels(), 4000);
                 }
                 else
                 {
                         //They have clicked before, but apparently they 
 clicked again, stop
 the timer and we will restart it.
                         clearTimeout( processTimerId );
                         processTimerId = setTimeout (process_pixels(), 4000);
                 }
                 counter++;

         }

 });

 function process_pixels(){

         var process_counter = 0;

         while (process_counter = counter)
         {
                 \$(#result).load('/px_creator.pl', {colorselect: pixelcolors
 [process_counter], id_select: pixelid[process_counter]});
                 process_counter++;
         }}

         /script

 Example:http://pixelated.hertzelle.com/draw.pl

 Can anyone tell me why my timer process doesnt work as I would want it
 to? I still have more work to go...But this has me a bit stuck. Any
 help would make me very happy, thanks!


[jQuery] Re: RSS Feed Aggregator with $.ajax

2009-01-31 Thread Ricardo Tomasi

Is that actually working? XPath selectors are not supported in jQuery
anymore.

Make it simple:

$(function() {

$.ajax({
type: GET,
url: http://anthonyjamesbruno.com/blog/?feed=rss2;,
dataType: xml,
success: function(rss) {
   strRSS = h4 + $(/rss/channel/title,rss).text() + /h4;
$(/rss/channel/item:lt(5),rss).each(function(i) {
   var t = $(this),
   link = t.find('link'),
   title = t.find('title'),
   description = t.find('description').text().substring
(0,200);
$('li/')
  .click(function(){ window.location.href = link })
  .append( title + 'br /' +
description )
  .appendTo('#feed_me');
  });
   }
});


On Jan 31, 7:51 pm, anthonyb anthonybr...@gmail.com wrote:
 Ive been editing this a little bit and thought that what i have below
 would work. but it doesn't.

 $(function() {

     $.ajax({
         type: GET,
         url: http://anthonyjamesbruno.com/blog/?feed=rss2;,
         dataType: xml,
         success: function(rss) {
             strRSS = h4 + $(/rss/channel/title,rss).text() + /
 h4;
             $(/rss/channel/item/title:lt(5),rss).each(function(i) {
                 strRSS += li onClick='location.href=';
                 strRSS += $(/rss/channel/item/link:eq( + i +
 ),rss).text();
                 strRSS += ';';
                 strRSS += $(this).text();
                 strRSS += br /;
                 strRSS += ($(/rss/channel/item/description:eq( + i +
 ),rss).text()).substring(0,200) + .../li;
             });
             $(#feed_me).html(strRSS);
         }
     });

 });


[jQuery] Re: jQuery and Javascript timer question

2009-01-31 Thread thertze...@gmail.com

Can someone tell me why my \$(this).css({ backgroundColor:color });
statement isn't changing as soon as the user clicks on a div?

On Jan 31, 5:57 pm, thertze...@gmail.com thertze...@gmail.com
wrote:
 What I'm trying to do is on click of a div spawn a
 timer (setTimeout) which will run while the user is on the page, on
 completion of the countedown of setTimeout, load a function to do a
 submit. However in my testing the following code does not wait, and
 submits the page event right away. Basically I want to be able to que
 up the click events and then process them during an idle few seconds.

 Check out my code below maybe you can help!

         script type=text/javascript
 var pixelid = new Array();
 var pixelcolors = new Array();
 var processTimerId = 0;
 var counter = 0;
 \$('#result').click(function(e) {
         if ( \$(e.target).is('.btn px') )
         {
                 var color = \$(input#color_code).val();
                 \$(this).css({ backgroundColor:color });
                 var id_select = \$(e.target).parent('div').attr('id');

                 pixelid[counter] = id_select;
                 pixelcolors[counter] = color;

                 if (counter == 0)
                 {
                         //They have not clicked before, so we are ready to 
 start the
 process timer
                         processTimerId = setTimeout (process_pixels(), 4000);
                 }
                 else
                 {
                         //They have clicked before, but apparently they 
 clicked again, stop
 the timer and we will restart it.
                         clearTimeout( processTimerId );
                         processTimerId = setTimeout (process_pixels(), 4000);
                 }
                 counter++;

         }

 });

 function process_pixels(){

         var process_counter = 0;

         while (process_counter = counter)
         {
                 \$(#result).load('/px_creator.pl', {colorselect: pixelcolors
 [process_counter], id_select: pixelid[process_counter]});
                 process_counter++;
         }}

         /script

 Example:http://pixelated.hertzelle.com/draw.pl

 Can anyone tell me why my timer process doesnt work as I would want it
 to? I still have more work to go...But this has me a bit stuck. Any
 help would make me very happy, thanks!


[jQuery] Re: RSS Feed Aggregator with $.ajax

2009-01-31 Thread anthonyb

Hi Richardo,

Thanks for the help, ive been messing around with what you provided
and cant seem to get it running..

Anything im doing wrong?


[jQuery] Re: Large images IE ready event

2009-01-31 Thread Alex

Thanks. Hopefully it will be fixed soon.

On Jan 31, 2:32 pm, Karl Swedberg k...@englishrules.com wrote:
 Hi Alex,

 Which version of jQuery are you using? If it's 1.3.1, there was a  
 regression that caused this problem.

 This has been fixed in the svn version. See the bug report here:

 http://dev.jquery.com/ticket/3988

 --Karl

 
 Karl Swedbergwww.englishrules.comwww.learningjquery.com

 On Jan 30, 2009, at 10:19 AM, Alex wrote:



  In IE 6 through 8, whenever I use $(document).ready(function(){ });,
  it doesn't get triggered if there are still images trying to load. I
  use a graphic engine to draw huge graphs and it can take up to 5
  seconds parsing the images and the code between the ready event doesnt
  get triggered until the images are fully loaded.

  It works flawlessly in Firefox. Only IE6-8 has this problem. Is there
  something I am missing in my code? Is this a known issue with IE?

  Thanks.


[jQuery] toggle checkbox when clicking td

2009-01-31 Thread Slafs

Hi!

I would like to write a js script using jQuery which could help me to
toggle checkbox.
I have one checkbox for each row of table and i would like to simplify
the checking and unchecking the boxes by letting user just to click
anywhere on the row to do this.
I was trying something with children and parent function but it seems
to doesn't work.

table:
table class=myTable
  tr
tdfirst/tdtdrow/td
tdinput type=checkbox name=1 value=1/td
  /tr
 ...
/table

my jQ code:
 $(document).ready(function(){
$(.myTable td).click(function(){
$(this).parent(tr).children
(input:checkbox).each(function(){
 this.checked = !this.checked;
});
});

any help?
thanks in advance!


[jQuery] preventDefault Form

2009-01-31 Thread OES

Hi People.

Hope you can advise.

I have a form loaded though an Ajax Call.

I now want to be able to use this form again by using an Ajax call. I
am unable to preventDefault unless I put it directly after the form
which I really dont want.

I know through other Ajax calls I have done that I have had to Bind 
Unbind the links but its not working with a from.

Here is a basic form example loaded.
form action# method=post id=addme
input type=text name= value= /
input name=submit type=submit value=Submit /
/form

Then the JS.
$(document).ready(function(){

  function ajaxSuccessCall(){

ajaxSuccessCall();

$('#addme').unbind('submit').bind('submit', function(event) {
event.preventDefault();
console.log(test);
// do form stuff
ajaxSuccessCall();
});

  }; // [END] ajax Call Success

}); //close

hope you can advise.

Thanks in advance


[jQuery] Cascading dropdown -chained - problem with IE

2009-01-31 Thread James

I am new to JQuery and your cascading dropdown was exactly what I was
looking for.  After formatting my data in JSON I have tested out the
Chained example and it ONLY WORKS in Firefox and NOT IE.

I am attempting to load the data from two external files, while your
example loads the second data set from a static var.

Is there a further step necessary to get this to work in IE?

I have my working example at: jamestilberg.com/jquery

Any help would be appreciated!  :)


[jQuery] Jquery UI Slider Events not raised

2009-01-31 Thread cartic

OK.. Here is the problem. I have downloaded the UI slider from Jquery
website. The slider shows up fine. The slider moves fine.. BUT.. none
of the callbacks are being called. i have searched high and low for
this but oculd not find anything.

Here is the code that i use
script src=js/jquery/jquery-1.3.1.js type=text/javascript/
script
script src=js/jquery/ui_core_slider.js type=text/javascript/
script
script type=text/javascript
$(document).ready(function(){
$('#slider_callout').hide();
$('#slider1_bar').slider({
handle: '.slider_handle',
stop: function (e, ui) {
console.log( stopped );
}
});
});
/script
!--- OTHER HTML HERE ---
div class='slider_bar' id=slider1_bar
div id=slider_callout/div
div id='slider1_handle' class='slider_handle'/div
/div

Thanks
Cartic


[jQuery] Cascade (chained) works in Firefox but not in IE

2009-01-31 Thread James

I am new to JQuery and your cascading dropdown was exactly what I was
looking for.  After formatting my data in JSON I have tested out the
Chained example (http://dev.chayachronicles.com/jquery/cascade/
index.html) and it ONLY WORKS in Firefox and NOT IE.

I am attempting to load the data from two external files, while your
example loads the second data set from a static var.

Is there a further step necessary to get this to work in IE?

I have my working example at: http://jamestilberg.com/jquery/

Any help would be appreciated!  :)


[jQuery] Re: Jquery UI Slider Events not raised

2009-01-31 Thread Richard D. Worth
Sounds like you are using incompatible versions of jQuery and jQuery UI.
jQuery UI 1.5.3 through 1.6rc4 are only compatible with jQuery 1.2.6. In
order to use jQueryu UI with jQuery 1.3+, you'll need the latest preview
release, jQuery UI 1.6rc6.

Also note: there is a dedicated mailing list for jQuery UI

http://groups.google.com/group/jquery-ui

should you have any further questions. Thanks

- Richard

On Sat, Jan 31, 2009 at 6:13 PM, cartic cnat...@gmail.com wrote:


 OK.. Here is the problem. I have downloaded the UI slider from Jquery
 website. The slider shows up fine. The slider moves fine.. BUT.. none
 of the callbacks are being called. i have searched high and low for
 this but oculd not find anything.

 Here is the code that i use
script src=js/jquery/jquery-1.3.1.js type=text/javascript/
 script
script src=js/jquery/ui_core_slider.js type=text/javascript/
 script
script type=text/javascript
$(document).ready(function(){
$('#slider_callout').hide();
$('#slider1_bar').slider({
handle: '.slider_handle',
stop: function (e, ui) {
console.log( stopped );
}
});
});
/script
 !--- OTHER HTML HERE ---
div class='slider_bar' id=slider1_bar
div id=slider_callout/div
div id='slider1_handle'
 class='slider_handle'/div
/div

 Thanks
 Cartic



[jQuery] .text()

2009-01-31 Thread Bob O

So below i have my code example.

Basically when a user loads this page depending on the type of
campaign this is, I want jQuery to show the proper Sub Form Piece. I
can get the alert() outside the if else to fire, but nothing inside
the if else fires, which leads me to believe that I might have the
args set incorrectly

any help would be great

Thanks

HTML **
div class=detail_campaign_typeCoupon/div --
This is the reference text that is dynamic

div id=campaign_create_coupon**Html Form Piece**/div

div id=campaign_create_contest **Html Form Piece**/div

$(document).ready(function() {
  var $coupon_div = $('#campaign_create_coupon');
  var $contest_div = $('#campaign_create_contest');
  var $current_campaign = $('div.detail_campaign_type');

  $current_campaign.ready(function() {
alert($('div.detail_campaign_type').text
());  -- This fires

if ($('div.detail_campaign_type').text() == 'Coupon') {
  alert
('hello');
-- Inside the If Else does not register
  $coupon_div.show();
  $contest_div.hide();
}
else if ($('div.detail_campaign_type').text() == 'Contest') {
  alert
('hello2');
-- Neither does this
  $coupon_div.hide();
  $contest_div.show();
}
  });
});


[jQuery] Re: .text()

2009-01-31 Thread Dave Methvin

   $current_campaign.ready(function() {

If the document is ready, the div is always ready, right?

     if ($('div.detail_campaign_type').text() == 'Coupon') {

Is it possible there are some leading or trailing spaces in the text?
The spaces actually retained in the text can vary by browser as well.


[jQuery] Re: jQuery and Javascript timer question

2009-01-31 Thread Dave Methvin

 Can someone tell me why my \$(this).css({ backgroundColor:color });
 statement isn't changing as soon as the user clicks on a div?

Does it fire at some later time, or never? What is the value of $
(input#color_code).val() ?


[jQuery] Re: jQuery and Javascript timer question

2009-01-31 Thread thertze...@gmail.com

\$(this).css({ backgroundColor:color }); never seem to fire, as far as
I know though, its valid jquery javascript...

As for the statement above (input#color_code).val()  is whatever
the user selects from the color picker.

If anyone is questioning my \$ in my javascript, i have to do it this
way, because I'm running this with a Perl script, and perl uses $ to
define and use variables.

On Jan 31, 10:15 pm, Dave Methvin dave.meth...@gmail.com wrote:
  Can someone tell me why my \$(this).css({ backgroundColor:color });
  statement isn't changing as soon as the user clicks on a div?

 Does it fire at some later time, or never? What is the value of $
 (input#color_code).val() ?


[jQuery] Re: jQuery and Javascript timer question

2009-01-31 Thread thertze...@gmail.com

Here is the most recent code

http://pastie.org/376427

If I could only get \$(this).css({ backgroundColor:color }); to
work, I would be happy? Please help me :D Thanks!

On Jan 31, 5:57 pm, thertze...@gmail.com thertze...@gmail.com
wrote:
 What I'm trying to do is on click of a div spawn a
 timer (setTimeout) which will run while the user is on the page, on
 completion of the countedown of setTimeout, load a function to do a
 submit. However in my testing the following code does not wait, and
 submits the page event right away. Basically I want to be able to que
 up the click events and then process them during an idle few seconds.

 Check out my code below maybe you can help!

         script type=text/javascript
 var pixelid = new Array();
 var pixelcolors = new Array();
 var processTimerId = 0;
 var counter = 0;
 \$('#result').click(function(e) {
         if ( \$(e.target).is('.btn px') )
         {
                 var color = \$(input#color_code).val();
                 \$(this).css({ backgroundColor:color });
                 var id_select = \$(e.target).parent('div').attr('id');

                 pixelid[counter] = id_select;
                 pixelcolors[counter] = color;

                 if (counter == 0)
                 {
                         //They have not clicked before, so we are ready to 
 start the
 process timer
                         processTimerId = setTimeout (process_pixels(), 4000);
                 }
                 else
                 {
                         //They have clicked before, but apparently they 
 clicked again, stop
 the timer and we will restart it.
                         clearTimeout( processTimerId );
                         processTimerId = setTimeout (process_pixels(), 4000);
                 }
                 counter++;

         }

 });

 function process_pixels(){

         var process_counter = 0;

         while (process_counter = counter)
         {
                 \$(#result).load('/px_creator.pl', {colorselect: pixelcolors
 [process_counter], id_select: pixelid[process_counter]});
                 process_counter++;
         }}

         /script

 Example:http://pixelated.hertzelle.com/draw.pl

 Can anyone tell me why my timer process doesnt work as I would want it
 to? I still have more work to go...But this has me a bit stuck. Any
 help would make me very happy, thanks!


[jQuery] Re: .text()

2009-01-31 Thread brian

On Sat, Jan 31, 2009 at 10:47 PM, Bob O sngndn...@gmail.com wrote:


 div class=detail_campaign_typeCoupon/div --
 This is the reference text that is dynamic

 div id=campaign_create_coupon**Html Form Piece**/div

 div id=campaign_create_contest **Html Form Piece**/div

 $(document).ready(function() {
  var $coupon_div = $('#campaign_create_coupon');
  var $contest_div = $('#campaign_create_contest');
  var $current_campaign = $('div.detail_campaign_type');


Why the $ before your vars? This ain't PHP (I do this all the time, btw)

  $current_campaign.ready(function() {
alert($('div.detail_campaign_type').text
 ());  -- This fires

Though I'm sure it's unrelated to the problem, since you're assigning
$('div.detail_campaign_type') to a var (current_campaign), you might
as well use that.

Oh, I think I see the problem. You're using a class to identify your
div. Do you have any other divs with that class on the page. If so,
you'll need to identify your target more clearly. If not, you should
consider using an ID instead.

At the minimum, try extending your if/else block with the following,
just to get a handle on things:

...
}
else
{
alert($('div.detail_campaign_type').text() );
}


[jQuery] Re: jQuery and Javascript timer question

2009-01-31 Thread brian

On Sat, Jan 31, 2009 at 11:19 PM, thertze...@gmail.com
thertze...@gmail.com wrote:

 \$(this).css({ backgroundColor:color }); never seem to fire, as far as
 I know though, its valid jquery javascript...

 As for the statement above (input#color_code).val()  is whatever
 the user selects from the color picker.

 If anyone is questioning my \$ in my javascript, i have to do it this
 way, because I'm running this with a Perl script, and perl uses $ to
 define and use variables.

Using the backslash within a Perl script which writes your javascript,
I can well understand. But the output--what the JS interpreter
sees--should be a bare $, not \$.

In any case, why not just use jQuery.noConflict()?


[jQuery] Re: Cascade (chained) works in Firefox but not in IE

2009-01-31 Thread Mike Nichols

@James
Thinking about what you are doing here with the third dropdown...By
attaching that dropdown to the second you are telling it to be
filtered by the second dropdown's selected value...which is not
selected yet since it just loaded so I would presume you shouldn't
have any data in the third drop down.
To support this behavior in the past I used the 'event' property of
the options to define which event actually fires a cascade ( the
defalt is 'changed'). Then I manually fire cascade within the parent
element's change handler. :
//when 'make' is selected...
$(.seconddropdown)
.cascade(.firstdropdown,{
ajax: 'firsturl.js'
})
.bind(change,function() {
$(this).trigger(custom.changed);//manually call cascade
});


$(.thirddropdown)
.cascade(.secondbehavior,{
event : custom.changed,//bind to custom event to prevent 
loading
from cascade
ajax: 'secondurl.js',
});



On Jan 31, 4:39 pm, James james.tilb...@gmail.com wrote:
 I am new to JQuery and your cascading dropdown was exactly what I was
 looking for.  After formatting my data in JSON I have tested out the
 Chained example (http://dev.chayachronicles.com/jquery/cascade/
 index.html) and it ONLY WORKS in Firefox and NOT IE.

 I am attempting to load the data from two external files, while your
 example loads the second data set from a static var.

 Is there a further step necessary to get this to work in IE?

 I have my working example at:http://jamestilberg.com/jquery/

 Any help would be appreciated!  :)


[jQuery] Re: Superfish Dropdown BG Problem

2009-01-31 Thread bklyn2cali

Ron,

I've made a bit of headway thanks to Firebug (recommended by Joel,
thank you).

You need to turn off the initial list-style call in the first 5 lines
of code in superfish.css. The browser sees that and ignores all else
after it. Like this:

/*** ESSENTIAL STYLES ***/
.sf-menu, .sf-menu * {
margin: 0;
padding:0;
/*  list-style: none; */

That did it for me. Of course you need to add a background tag as
mentioned previously.

Good luck,

Sean



On Jan 31, 9:07 am, levine@gmail.com levine@gmail.com
wrote:
 Thanks Joel,

 I was the other guy a few days ago.

 Does this code snippet go into the superfish.css file???

 With regards,
 Ron

 On Jan 31, 6:08 am, Joel Birch joeldbi...@gmail.com wrote:

  Hello,

  This is the exact same issue someone else had just the other day, and
  they were also a Joomla user. Your problem is figure out by selecting
  the menu li element using Firebug. The Superfish background rule is
  being overridden by the #pillmenu li li rule which is in the green.css
  file. The reason this rule gets precedence over the Superfish CSS is
  because it uses an id in the selector, which trumps the .sf-menu class
  selector.

  Interestingly, 'pillmenu' was the exact same id that was involved with
  the other Joomla user's issue, so I assume it must be part of Joomla's
  templates. Solve your problem by adding the id to your Superfish
  selector in order to increase its 'specificity', like this:

  #pillmenu .sf-menu li { background: #BDD2FF url('../images/
  normal_bg.png') repeat-x 0 0; }

  Joel Birch.


[jQuery] Re: ZendX_JQuery

2009-01-31 Thread Junaid

thanks for the reply,
but when i put  ?= $this-jQuery(); ?

page displays

jQuery(); ?

any problem with php? please help