[jQuery] Re: IE problem

2010-01-16 Thread Valerij
Why do you think that? Because only the first tab stops working, the
other 2 tabs keep working, css wise they are not different at all..

On Jan 16, 3:02 am, Nivanka fonseka...@gmail.com wrote:
 This is CSS more than javascript I think. Try to absolute position the
 popups / and position them with bottom:0px; and then margins.

 On Jan 15, 11:47 pm, Valerij valeri...@gmail.com wrote:



  Hi guys, I have this annoying problem with IE that makes no sense, I
  have these pop ups which works perfectly in all browsers but IE, in IE
  it works great the first time - I can open all of the tabs once, but
  after I close them all, I cant open the first one, but others works
  fine! Then if I refresh, I can open all tabs, but once I close them
  and try reopening the first tab - doesn't work!

  Page at where this script is 
  implemented;http://ferok.com/labs/test.htmlThebottom bar is the one that 
  throws
  the pop upshttp://ferok.com/labs/global.jsThisis the JS


[jQuery] IE problem

2010-01-15 Thread Valerij
Hi guys, I have this annoying problem with IE that makes no sense, I
have these pop ups which works perfectly in all browsers but IE, in IE
it works great the first time - I can open all of the tabs once, but
after I close them all, I cant open the first one, but others works
fine! Then if I refresh, I can open all tabs, but once I close them
and try reopening the first tab - doesn't work!

Page at where this script is implemented;
http://ferok.com/labs/test.html The bottom bar is the one that throws
the pop ups
http://ferok.com/labs/global.js This is the JS


[jQuery] Re: Argh!! IE8!

2010-01-12 Thread Valerij
Alright, I've changed the as that are not links to divs, page is
fully valid now, but same thing happens! Just that nows its totally
impossible to open ANY of popup while it works in all other browsers!

On Jan 12, 9:19 am, Jonathan Vanherpe (T  T NV) jonat...@tnt.be
wrote:
 RobG wrote:

  On Jan 12, 5:51 am, Valerijvaleri...@gmail.com  wrote:
  Hey guys, I have this popup menu that works.. great! In Chrome,
  Safari, Firefox AND it USED to work in IE8, until I added just 1 div.
  [...]

  This works in all the browsers great even after I added this div, but
  in IE8 it suddenly stopped.

  a id=acc class=baritem href=javascript:void(0);div
  class=textupMy Account/div/a

  Your markup is invalid, div elements don't belong inside a elements.

  [...]
  Is there a fix for this?

  Start with valid markup:URL:http://validator.w3.org/

 Also, if it's not a link, don't use an a element.

 Jonathan
 --
 Jonathan Vanherpe - Tallieu  Tallieu NV - jonat...@tnt.be


[jQuery] Re: Argh!! IE8!

2010-01-12 Thread Valerij
Yeah, sorry for that, I've compressed the code, then changed the HTML
when It suddenly stopped working, thats why JS is like this.
d is event, $(document).click(function(event){
var a=_menu;

What this does is that it checks if any of the popups are open, if one
of them is open, b will be sett to the name of the div that is open,
then I add the _menu and see if click came outside the, for example,
#acc_menu, (which is open), If it came outside this, the pop up will
close itself.


I've upgraded the code to addClass, removeClass and hasClass like you
said, it works better. In IE the menu starts opening and the start
closing, I guess its because In my code there is 2 triggers, 1 when
you click the button it starts showing, and then there is a function
that analyses each click. Whats weird is that it again works in all
browsers but IE.

This is the JS at this point:
http://ferok.com/labs/global.js

I thought it was enough to add this return false for it to stop
reading?


On Jan 12, 5:43 pm, MorningZ morni...@gmail.com wrote:
 What makes it hard to follow your code,

 what is d?    $(document).click(function(d){

 why is is about clicking on the document?

 what is a?    if($(#acc+a).is(:visible)){

 also, have you considered moving away from :visible?  it's got it's
 quirks and niches going across browsers...  maybe using CSS classes
 and hasClass, addClass, removeClass instead?

 On Jan 12, 11:31 am, Valerij valeri...@gmail.com wrote:



  Alright, I've changed the as that are not links to divs, page is
  fully valid now, but same thing happens! Just that nows its totally
  impossible to open ANY of popup while it works in all other browsers!

  On Jan 12, 9:19 am, Jonathan Vanherpe (T  T NV) jonat...@tnt.be
  wrote:

   RobG wrote:

On Jan 12, 5:51 am, Valerijvaleri...@gmail.com  wrote:
Hey guys, I have this popup menu that works.. great! In Chrome,
Safari, Firefox AND it USED to work in IE8, until I added just 1 div.
[...]

This works in all the browsers great even after I added this div, but
in IE8 it suddenly stopped.

a id=acc class=baritem href=javascript:void(0);div
class=textupMy Account/div/a

Your markup is invalid, div elements don't belong inside a elements.

[...]
Is there a fix for this?

Start with valid markup:URL:http://validator.w3.org/

   Also, if it's not a link, don't use an a element.

   Jonathan
   --
   Jonathan Vanherpe - Tallieu  Tallieu NV - jonat...@tnt.be


[jQuery] Argh!! IE8!

2010-01-11 Thread Valerij
Hey guys, I have this popup menu that works.. great! In Chrome,
Safari, Firefox AND it USED to work in IE8, until I added just 1 div.

I believe this is the part that causes it;
$(document).click(function(d){
if($(#acc+a).is(:visible)){
var b=#acc
}else{
if($(#frd+a).is(:visible)){
var b=#frd
}else{
if($(#gam+a).is(:visible)){
var b=#gam
}
}
}
var c=b+a;
if(!$(d.target).closest(c).size()){
$(c).hide(fast)
}
});

What this does, is first to check if any of my 3 popup menus are open,
if one of them is open, it will check of click came outside the popup
menu, and if it was, the open popup menu will.. close itself.

This works in all the browsers great even after I added this div, but
in IE8 it suddenly stopped.

a id=acc class=baritem href=javascript:void(0);div
class=textupMy Account/div/a
a id=frd class=baritem href=javascript:void(0);div
class=textupMy Friends/div/a
a id=gam class=baritem href=javascript:void(0);div
class=textupMy Games/div/a

div id=acc_menu class=popup
a href=##stuff/a
/div
div id=frd_menu class=popup
a href=##stuff/a
/div
div id=gam_menu class=popup
a href=##stuff/a
/div


After I added the div class=textup in the menu, it stopped
working, If I remove it, it works! Now when I click anywhere outside
the popup menu, the first menu STARTS to go up, but then half way it
closes down

On this page; http://ferok.com/labs/test.html

Is there a fix for this?


[jQuery] Re: New to JS and jQuery

2010-01-05 Thread Valerij
This still wont work.. I've even tried copy your example character by
character and it still gives nothing..
I'm using this code on http://ferok.com/labs/test.html at the bottom
bar, try clicking the My Account and the menu wont pop up. I had
this working before, but I didn't have this dynamic code which I can
use to open more than just 1 tab.

The CSS:
#stuff_menu {background-color:#E8E8E8;border: 1px solid #66;bottom:
22px;display:none;left:0px;padding:5px 5px 1px 5px;position:
absolute;width:200px;}

On Jan 5, 5:03 pm, brian zijn.digi...@gmail.com wrote:
 That works for me but I do see how this can be refactored:

 a id=stuff class=baritem href=#stuff_menuMy Account/a

 div id=stuff_menu class=SomeClass
         a href=##My Account/a
         a href=##More stuff/a
         a href=##Here is a menu item/a
         a href=##Here is a menu item/a
         a href=##Here is a menu item/a
         a href=##Here is a menu item/a
 /div

 Notice that I've changed the IDs so that the DIV has the link ID plus
 some other string, rather than the other way around.

 Also, I've added a class to the DIV to make it easier to set styles.
 This isn't strictly necessary.

 $(function()
 {
         /* set up the onclick handler for all links on page load
          */
         $('.baritem').click(function()
         {
                 $('#' + this.id + '_menu').toggle();
                 return false;
         });



 });
 On Mon, Jan 4, 2010 at 4:01 PM, Valerij valeri...@gmail.com wrote:
  Hey guys, I'm trying to create 1 really simple function but it just
  doesn't work!

  function showMenu(menu) {
         var menuid = $( #+menu );
         var menuRoot = $( #+menu+-root );

         menuid.toggle();
         menuRoot.blur();
  }

  What this suppose to do is when you click a link, it will change
  settings of a specific div to visible
  The HTML:

  a id=stuff-root class=baritem href=javascript:void(0)
  onclick=showMenu('stuff');My Account/a
  div id=stuff
         a href=##My Account/a
         a href=##More stuff/a
         a href=##Here is a menu item/a
         a href=##Here is a menu item/a
         a href=##Here is a menu item/a
         a href=##Here is a menu item/a
  /div

  Why doesn't this work? What am I doing wrong.. When I alert this, I
  get the correct div ids?


[jQuery] Re: New to JS and jQuery

2010-01-05 Thread Valerij
I have $('.baritem').. I thought that was to find class .baritem? As
said, Im new to jQuery so I don't know.. All I wanna do is having this
script being able to pop up (like on facebook) more than just 1 box
(Depending on which button you click, like: IF you click on a button
with ID of menu it opens menu_menu if you click stuff if opens
menu_stuff etc.. and I cant set it to just 1 ID cause then this wont
work dynamicly eg. I wont be able to run more than just 1 box with
this script as I cant set all the buttons to the same ID?

Brian got the idea, just that the script doesn't work.

On Jan 5, 9:14 pm, MorningZ morni...@gmail.com wrote:
 You should pay attention to your selectors :)

 you have

 $('baritem').click(function()

 that looks for baritem DOM objects

 but

 $('#baritem').click(function()

 will find div id=baritem

 On Jan 5, 2:41 pm, Valerij valeri...@gmail.com wrote:



  This still wont work.. I've even tried copy your example character by
  character and it still gives nothing..
  I'm using this code onhttp://ferok.com/labs/test.htmlatthe bottom
  bar, try clicking the My Account and the menu wont pop up. I had
  this working before, but I didn't have this dynamic code which I can
  use to open more than just 1 tab.

  The CSS:
  #stuff_menu {background-color:#E8E8E8;border: 1px solid #66;bottom:
  22px;display:none;left:0px;padding:5px 5px 1px 5px;position:
  absolute;width:200px;}

  On Jan 5, 5:03 pm, brian zijn.digi...@gmail.com wrote:

   That works for me but I do see how this can be refactored:

   a id=stuff class=baritem href=#stuff_menuMy Account/a

   div id=stuff_menu class=SomeClass
           a href=##My Account/a
           a href=##More stuff/a
           a href=##Here is a menu item/a
           a href=##Here is a menu item/a
           a href=##Here is a menu item/a
           a href=##Here is a menu item/a
   /div

   Notice that I've changed the IDs so that the DIV has the link ID plus
   some other string, rather than the other way around.

   Also, I've added a class to the DIV to make it easier to set styles.
   This isn't strictly necessary.

   $(function()
   {
           /* set up the onclick handler for all links on page load
            */
           $('.baritem').click(function()
           {
                   $('#' + this.id + '_menu').toggle();
                   return false;
           });

   });
   On Mon, Jan 4, 2010 at 4:01 PM, Valerij valeri...@gmail.com wrote:
Hey guys, I'm trying to create 1 really simple function but it just
doesn't work!

function showMenu(menu) {
       var menuid = $( #+menu );
       var menuRoot = $( #+menu+-root );

       menuid.toggle();
       menuRoot.blur();
}

What this suppose to do is when you click a link, it will change
settings of a specific div to visible
The HTML:

a id=stuff-root class=baritem href=javascript:void(0)
onclick=showMenu('stuff');My Account/a
div id=stuff
       a href=##My Account/a
       a href=##More stuff/a
       a href=##Here is a menu item/a
       a href=##Here is a menu item/a
       a href=##Here is a menu item/a
       a href=##Here is a menu item/a
/div

Why doesn't this work? What am I doing wrong.. When I alert this, I
get the correct div ids?


[jQuery] New to JS and jQuery

2010-01-04 Thread Valerij
Hey guys, I'm trying to create 1 really simple function but it just
doesn't work!

function showMenu(menu) {
var menuid = $( #+menu );
var menuRoot = $( #+menu+-root );

menuid.toggle();
menuRoot.blur();
}

What this suppose to do is when you click a link, it will change
settings of a specific div to visible
The HTML:

a id=stuff-root class=baritem href=javascript:void(0)
onclick=showMenu('stuff');My Account/a
div id=stuff
a href=##My Account/a
a href=##More stuff/a
a href=##Here is a menu item/a
a href=##Here is a menu item/a
a href=##Here is a menu item/a
a href=##Here is a menu item/a
/div



Why doesn't this work? What am I doing wrong.. When I alert this, I
get the correct div ids?