[jQuery] detecting jQuery objects constructor property

2009-09-17 Thread Nico

Hi,

When I create a jQuery Object, it's known by javascript as an object,
and it behaves like a function.

In some cases, I have to check if a variable is a jQuery object or
not.

Usually, to check a variable type, I use the constructor property
(when I can't use typeof, which is not accurate).
In case of jQuery, the constructor property equals Object, so I can't
is it.

Would it be possible to change this, so I could get for example :

$([]).constructor === jQuery


This would be great, no ??


[jQuery] Re: detecting jQuery objects constructor property

2009-09-17 Thread Nico

I just try a little change in jQuery source code, that made it well,
and I met no bugs :

In the jQuery.fn.init method, I just added the line :

this.constructor = jQuery;


This way, all jQuery objects have a constructor property and it
equals jQuery


Any arguments against this ?


Nico


[jQuery] Re: animate : animable properties

2009-09-14 Thread Nico

Hello,

I didn't find any solution for my problem yet.
Can anyone help me ?

I have a JS object defining CSS properties. I'd like to remove from
this object all the properties that can't be animated.

example :

I have this object :

var myObject = {
height: '100px',
width: '100px',
color: 'red',
'margin-top': '25px',
overflow: 'auto'
}

I want to get only the properties I can use to make an animation, so
the result should be :

var myObjectFiltered = {
height: '100px',
width: '100px',
'margin-top': '25px'
}


But I know jQuery plugins can add some animations possibilities, like
animating colors for example. In this case the result should be :

var myObjectFiltered = {
height: '100px',
width: '100px',
color: 'red',
'margin-top': '25px'
}

anyone knows how to do this ?

thanks
Nico


 I'm coding a jQuery plugin to draw modal windows. In this plugin, I
 make animations to show and hide the modal window.
 I'd like my plugin to be as much customizable as possible. So I want
 the animations to be customizable also. To do this, I have one option
 for the general css properties (the style of the window), one for css
 properties before showing animation, and one for css properties
 after hidding animation.

 To make the show animation, I start by applying general style +
 before styles (before styles overwrites general styles). Than I get
 the difference between before styles and general styles,, and I use
 this object as the animation properties.

 To make the hide animation, the general styles are already applied,
 I just launch an animation using the after hiding styles as the
 animation properties.

 All this works very well, but I have just one small problem : All css
 properties can't be used as animation properties. And if I try to
 launch an animation with a non-animable css property, than the
 animation bugs.
 So I have to filter the properties I give to the animate function, to
 remove all non-animable properties. But to do this, I have to get a
 list of animable css properties.

 Does someone knows how I can manage to get this list ? is there
 something like this in jQuery ?


[jQuery] Re: animate : animable properties

2009-09-14 Thread Nico

Hi,

 the goodProps array stores all the properties which you would like to be
 able to animate.

In fact I already use this solution. I defined a table with all the
properties that can be animated, and than I use this reference as a
filter.
But this way, I don't handle custom animation properties. For example,
if I use the plugin Color Animations, than the color property can
be animated. But this property is not in my filter table, so I won't
be able to use it. Or I'll have to register the property in my filter
table before I can use it, and I don't want to do this.

I'd like to be able to ask jQuery which properties can be animated,
and build my filter table from this information. It should be possible
to get this info, no ? How jQuery knows how to handle each property ?


Nico


[jQuery] animate : animable properties

2009-09-04 Thread Nico

Hi,

I'm coding a jQuery plugin to draw modal windows. In this plugin, I
make animations to show and hide the modal window.
I'd like my plugin to be as much customizable as possible. So I want
the animations to be customizable also. To do this, I have one option
for the general css properties (the style of the window), one for css
properties before showing animation, and one for css properties
after hidding animation.

To make the show animation, I start by applying general style +
before styles (before styles overwrites general styles). Than I get
the difference between before styles and general styles,, and I use
this object as the animation properties.

To make the hide animation, the general styles are already applied,
I just launch an animation using the after hiding styles as the
animation properties.

All this works very well, but I have just one small problem : All css
properties can't be used as animation properties. And if I try to
launch an animation with a non-animable css property, than the
animation bugs.
So I have to filter the properties I give to the animate function, to
remove all non-animable properties. But to do this, I have to get a
list of animable css properties.

Does someone knows how I can manage to get this list ? is there
something like this in jQuery ?

Nico


[jQuery] Re: ie6/Z superfish navbar li submenu always above ul subsubmenu

2009-07-09 Thread nico

Hi,

Thank you for your answer.

Yes, I also think it has nothing to do with Z-Index but with the
position: relative of the li elements and the absoulte position of the
submenu ul.

But I think my space is big enough my Problem is not the mainmenu but
the submenu it opens in a navbar (850px width) and when there are too
many items in it there are two rows of items. And when I then hover
over an item in the first row the submenu ul alyways apears behind the
li item in the second row.

So what I need is a Idea to bring the absoulte ul above the relative
li element.



On 8 Jul., 18:37, Charlie charlie...@gmail.com wrote:
 if your main menu items don't fit into space allowed and you force them into 
 wrapping to multiple levels, a different design approach migtht be in order?
 the position :rel has to be there for absolute position to use as reference 
 location
 problem has nothing to do with z-index in my opinion, you're expecting too 
 much in too little space.Seeing the live situation may help, can you post a 
 link?
 nico wrote:Hi, I have a problem with the superfish menu in navbar mode and 
 ie6/7. The first submenu items are in a full width row. If there are lots of 
 subitems i get two rows. If an item in the first row has a submenu it opens 
 as dropdown (200px width) right below the item. This works good in all 
 browser except in ie6/7. Here I have the problem that the li submenu navbar 
 item in the second row appears always above the dropdown if it opens from an 
 item in the first row. Thats because the li items in the navbar are 
 positition relative and the ul of the dropdown is absolute, so the li 
 pos.:rel. is always above ul pos. absol. no matter what z-indexes are given. 
 You can see the effect on the official demo 
 sitehttp://users.tpg.com.au/j_birch/plugins/superfish/#examplesJust bring the 
 Browser Window widht to 300px so that the demo menu has two menuitem in the 
 row and two rows, hover over the first mainmenu item and you see just 3 
 submenuitems instead of 4 (because the first submenu item is hidden behind 
 the second mainmenu row.) Do you know this issue and any workarounds? btw. 
 superfish is awsome!


[jQuery] Re: ie6/Z superfish navbar li submenu always above ul subsubmenu

2009-07-09 Thread nico

Hi Charlie,

Thanks again for your ideas, if theres no other way I maybe let the
subsubmenu ul obens also in a navbar 850px widht right under the first
navbar.

ok, here is an example of the superfish menu.
http://www.premioweb.eu/jobs/

hover over mainmenu item01 - submenuitem01
you see in ie6/7 this leads to my problem.



On 9 Jul., 13:43, Charlie charlie...@gmail.com wrote:
 another thought, can also do this programatically using the onBeforeShow 
 option. Same idea, add a class to the wrapped ul's .
 onBeforeShow:  function(){
                     if ($(this).hasClass(secondRowClass)) {
                               $(this).css(top,5em);
 }
 Again, untested but I have used this method to do realignments and animations 
 before. Either of these solutions is workable
 Charlie wrote:Following concept would allow the subs of second row to open 
 below that row. This is untested but should be relatively easy to implement
 Add a class to the wrapped li's forming 2nd row then create a different css 
 position rule for sub ul of that class based on height of the navbar li's. 
 The offset would be double the value currently used for the sub ul .  Default 
 is 2.5em, so try 5em or adjust accordingly based on css you've modified
 Again, posting a test case would be very helpful. Your original suggestion of 
 making browser go to 300px wide was very misleading as to actual situation
 nico wrote:Hi, Thank you for your answer. Yes, I also think it has nothing to 
 do with Z-Index but with the position: relative of the li elements and the 
 absoulte position of the submenu ul. But I think my space is big enough my 
 Problem is not the mainmenu but the submenu it opens in a navbar (850px 
 width) and when there are too many items in it there are two rows of items. 
 And when I then hover over an item in the first row the submenu ul alyways 
 apears behind the li item in the second row. So what I need is a Idea to 
 bring the absoulte ul above the relative li element. On 8 Jul., 18:37, 
 Charliecharlie...@gmail.comwrote:if your main menu items don't fit into 
 space allowed and you force them into wrapping to multiple levels, a 
 different design approach migtht be in order? the position :rel has to be 
 there for absolute position to use as reference location problem has nothing 
 to do with z-index in my opinion, you're expecting too much in too little 
 space.Seeing the live situation may help, can you post a link? nico wrote:Hi, 
 I have a problem with the superfish menu in navbar mode and ie6/7. The first 
 submenu items are in a full width row. If there are lots of subitems i get 
 two rows. If an item in the first row has a submenu it opens as dropdown 
 (200px width) right below the item. This works good in all browser except in 
 ie6/7. Here I have the problem that the li submenu navbar item in the second 
 row appears always above the dropdown if it opens from an item in the first 
 row. Thats because the li items in the navbar are positition relative and the 
 ul of the dropdown is absolute, so the li pos.:rel. is always above ul pos. 
 absol. no matter what z-indexes are given. You can see the effect on the 
 official demo 
 sitehttp://users.tpg.com.au/j_birch/plugins/superfish/#examplesJust bring the 
 Browser Window widht to 300px so that the demo menu has two menuitem in the 
 row and two rows, hover over the first mainmenu item and you see just 3 
 submenuitems instead of 4 (because the first submenu item is hidden behind 
 the second mainmenu row.) Do you know this issue and any workarounds? btw. 
 superfish is awsome!


[jQuery] ie6/Z superfish navbar li submenu always above ul subsubmenu

2009-07-08 Thread nico

Hi,

I have a problem with the superfish menu in navbar mode and ie6/7.

The first submenu items are in a full width row. If there are lots of
subitems i get two rows. If an item in the first row has a submenu it
opens as dropdown (200px width) right below the item.

This works good in all browser except in ie6/7. Here I have the
problem that the li submenu navbar item in the second row appears
always above the dropdown if it opens from an item in the first row.

Thats because the li items in the navbar are positition relative and
the ul of the dropdown is absolute, so the li pos.:rel. is always
above ul pos. absol. no matter what z-indexes are given.

You can see the effect on the official demo site
http://users.tpg.com.au/j_birch/plugins/superfish/#examples
Just bring the Browser Window widht to 300px so that the demo menu has
two menuitem in the row and two rows, hover over the first mainmenu
item and you see just 3 submenuitems instead of 4 (because the first
submenu item is hidden behind the second mainmenu row.)


Do you know this issue and any workarounds?

btw. superfish is awsome!


[jQuery] Strange animate behaviour

2009-05-28 Thread Nico


I get this strange jumpy animate behaviour in IE7
And in FF, chrome the animation flickers after completion.

http://87.253.136.51/~gosi/nl
(click trough the slides)

HTML

div class=widget_portfolio
  ul
li class=active
  div class=titleDuo Vertaalburo/div
  div class=indicator
a href=#01/a
  /div
  div class=handle
a href=#/a
  /div
  div class=content
a href=nl/zie/portfolio/2-duo-vertaalburo.html
title=Duo Vertaalburo
  img src=files/module_portfolio/image_2.jpg
alt=Duo Vertaalburo /
/a
  /div
/li
li
  div class=titleI Love Vintage/div
  div class=indicator
a href=#02/a
  /div
  div class=handle
a href=#/a
  /div
  div class=content
a href=nl/zie/portfolio/3-i-love-vintage.html
title=I Love Vintage
  img src=files/module_portfolio/image_3.jpg
alt=I Love Vintage /
/a
  /div
/li
li
  div class=titleUrpop/div
  div class=indicator
a href=#03/a
  /div
  div class=handle
a href=#/a
  /div
  div class=content
a href=nl/zie/portfolio/1-urpop.html
title=Urpop
  img src=files/module_portfolio/image_1.jpg
alt=Urpop /
/a
  /div
/li
li
  div class=titleXstrel/div
  div class=indicator
a href=#04/a
  /div
  div class=handle
a href=#/a
  /div
  div class=content
a href=nl/zie/portfolio/9-xstrel.html
title=Xstrel
  img src=files/module_portfolio/image_9.jpg
alt=Xstrel /
/a
  /div
/li
 /ul
 /div


CSS:
.widget_portfolio   { width: 100%; 
height: 330px; padding: 12px 0px
0px 0px; margin: 0px 74px; overflow: hidden; clear: both; }
.widget_portfolio ul{ margin: 0px; padding: 
0px; list-style:
none; }
.widget_portfolio ul li { display: inline; 
margin: 0px; padding:
0px 1px; float: left; }
.widget_portfolio ul li.active .content { display: block; }
.widget_portfolio ul li.active .title   { display: block; }
.widget_portfolio ul li .indicator a{ color: #00; 
font-size:
9px; display: block; width: 12px; text-align: center; }
.widget_portfolio ul li .handle { display: block; float: left;
width: 12px; height: 292px; }
.widget_portfolio ul li .handle a   { display: block; 
width: 100%;
height: 100%; background: #b5b3b3; }
.widget_portfolio ul li .handle a:hover { background: #eb0d8c; }
.widget_portfolio ul li .content{ display: none; float: 
left; }
.widget_portfolio ul li .title  { display: none; 
position: absolute;
margin: 310px 0px 0px 30px; }


JQUERY:
$(.widget_portfolio .handle, .widget_portfolio .indicator).click
(function(){
var slide = $(this).closest(li);
var active = $(this).closest(.widget_portfolio).find(.active);

if (!$(slide).hasClass(active)) {
var contentactive = $(active).find(.content);
var contentslide = $(slide).find(.content);

$(active).find(.content).stop(true,true).animate({width: 
hide,
opacity: 0},slow,,function(){
$(active).find(.title).hide();
$(active).removeClass(active);
});
$(slide).find(.content).stop(true,true).animate({width: 
show,
opacity: 1},slow,,function(){
$(slide).find(.title).slideDown();
$(slide).addClass(active);
});
}
return false;
});


Does anybody know what the problem is and point me in the right
direction?


[jQuery] JQuery UI Accordion option collapsible:true not collapsing

2009-04-23 Thread Nico

I have a simple Accordion which I have given the settings:

$(#accordion).accordion({
event: mouseover,
header: h3,
active: false,
collapsible: true,
autoHeight: true
});


And has layout:

div id=accordion
h3 class=featured-pic-container111/h3
div
pAAA/p
/div
h3 class=featured-pic-container222/h3
div
pBBB/p
/div
h3 class=featured-pic-container333/h3
div
pCCC/p
/div
/div


I would like the whole accordion to collapse upon mouseout, but
collapsible:true doesn't seem to do this. Any suggestions?

Many thanks,

Nico


[jQuery] Re: Jquery.media fails with querystring

2009-03-26 Thread Nico

Hi,

today I tried to upgrade from jQuery Media 0.8 to 0.87, and I met the
same problem.

With version 0.8, jQuery.media was able to handle links like this :
a href=mms://path/to/my/video.wmv?arg=valuelink/a
The media type was correct (Windows media player).

With version 0.87, jQuery.media doesn't handle anymore this kind of
link.

Any way to correct this ?

thanks,

Nico

On 27 fév, 16:11, James Tindall james.tind...@gmail.com wrote:
 Hi,

 If there's any kind of query string on the end of an flv file name in
 the href of the element that is to be overwritten the media plugin
 fails to overwrite the element with the embed code? Anyone know how to
 fix/work-round this??

 cheers,

 James


[jQuery] Smooth page auto scrolling - how to they do this?

2009-01-15 Thread Nico

I'm very impressed by this website
http://www.blackestate.co.nz/

Does anyone know a jquery plugin that would allow that smooth page
auto scrolling behaviour when you click the section links on the left
hand side?

thanks,

n


[jQuery] Invalid Argument in IE 7.0

2007-09-14 Thread Nico

Hello,

I'm using the latest version of Jquery (1.2) and I need to use the
attr() function. Unfortunately it doesn't work correctly with IE 7.
I recieve a Javascript Error : Invalid Argument, Line 883. Does
anyone know how I can fix it ?

Regards,
Nico.



[jQuery] Re: Invalid Argument in IE 7.0

2007-09-14 Thread Nico

This function is called by a plugin that i use : 
http://opiefoto.com/articles/photoslider.

Nico.

On 14 sep, 13:53, Erik Beeson [EMAIL PROTECTED] wrote:
 How are you using it?

 --Erik

 On 9/14/07, Nico [EMAIL PROTECTED] wrote:



  Hello,

  I'm using the latest version of Jquery (1.2) and I need to use the
  attr() function. Unfortunately it doesn't work correctly with IE 7.
  I recieve a Javascript Error : Invalid Argument, Line 883. Does
  anyone know how I can fix it ?

  Regards,
  Nico.



[jQuery] How optimize $(this).children(span).children(a).html(it works);

2007-08-28 Thread Nico

Hello,

I'm trying to optimize this selector:

$(this).children(span).children(a).html(it works);

Because I think that these 2 .children are not light javascript

My HTML:
div id=container
   span
a href=#My link/a
   /span
/div

I try something like $(this  span  a).html(it works);

But it doesn't work.

I'm sure that it's a dummy question but i doesn't find by myself...
thanks for your help.



[jQuery] [Resolved] Re: How optimize $(this).children(span).children(a).html(it works);

2007-08-28 Thread Nico

Wonderfull! :-) It works with this one:

 $(this).find('/span/a').html('it works');

Thanks a lot for your help

On 28 août, 12:48, Erik Beeson [EMAIL PROTECTED] wrote:
 Also, you could do it XPath style (untested):

 $(this).find('/span/a').html('it works');

 For more info, check out:

 http://docs.jquery.com/DOM/Traversing/Selectors

 --Erik

 On 8/28/07, Erik Beeson [EMAIL PROTECTED] wrote:

  Your last guess is the right idea, but not valid javascript syntax. Maybe 
  try:

  $(this).find(spana).html(it works);

  If you just want all of the anchors under 'this', you can do:

  $(this).find('a').html(...);

  If you know the ID of the element you're looking under, you can do:

  $('#container  span  a').html('it works');

  Or:

  $('#container a').html('it works');

  Depending on what anchors you want.

  --Erik

  On 8/28/07, Nico [EMAIL PROTECTED] wrote:

   Hello,

   I'm trying to optimize this selector:

   $(this).children(span).children(a).html(it works);

   Because I think that these 2 .children are not light javascript

   My HTML:
   div id=container
  span
   a href=#My link/a
  /span
   /div

   I try something like $(this  span  a).html(it works);

   But it doesn't work.

   I'm sure that it's a dummy question but i doesn't find by myself...
   thanks for your help.



[jQuery] Re: Jquery doesn't work with mod_rewrite ?

2007-07-22 Thread Nico

Hello,

I've got two parts in my file. When I access my website by typing
my.site.com, JQuery doesn't work even in the file jquery.js is
correctly loaded. However, when I am on www.site.com, everything works
perfectly.

 RewriteCond %{HTTP_HOST} ^my\.site.com [NC]
 RewriteRule ^inscription.html$ /home/site/www/index.php?op=inscription [L]
 RewriteRule ^inbox.html$ /home/site/www/index.php?op=zm_msg [L]

 RewriteCond %{HTTP_HOST} ^(www\.?)site.com [NC]

 RewriteRule ^accueil.html$ index.php [L]

Nico.



[jQuery] Re: Jquery doesn't work with mod_rewrite ?

2007-07-22 Thread Nico

Hello;

I've got two parts in my file. The first part is :

 RewriteCond %{HTTP_HOST} ^my\.site.com [NC]
 RewriteRule ^inscription.html$ /home/site/www/index.php?op=inscription [L]
 RewriteRule ^inbox.html$ /home/site/www/index.php?op=zm_msg [L]

And the second part is :

 RewriteCond %{HTTP_HOST} ^(www\.?)site.com [NC]

 RewriteRule ^accueil.html$ index.php [L]

When I acces my website by typing 'http://my.site.com/
inscription.html', JQuery doesn't work. However I've some aliases
(site.net, .org, .biz, ...) and they don't work too. I can only use
javascript when I am on http://www.site.com.

Nico.



[jQuery] Re: Jquery doesn't work with mod_rewrite ?

2007-07-22 Thread Nico

That works now :) The bug was because of the base / tag.

Thank You !
Nico.



[jQuery] Jquery doesn't work with mod_rewrite ?

2007-07-21 Thread Nico

Hello,

I've already post this message in another lists wihch was not the
right one.

Hello,

First of all, I'd like to say that the JQuery lib is the best I've
ever used ! But I've a tiny problem with my script.
I'm rewriting URLs with the mod_rewrite and when I try to run
JavaScript scripts powered by JQuery, it doesn't work if it's a
rewritten URL and I can't fix that.

Can you help me ?

Thanks in advance,
Nico.

I've tried to use absolute and relative path in my src attribute in
my script element but none of them fixed my problem. Jquery.js is
correctly loaded but I can't run any of the functions.

Thanks,
Nico.