[jQuery] how to serialize an array?

2009-09-26 Thread Althalos

Hi
I have an array in a Javascript/jQuery code, and I want to pass it to
a php file. It has an arbitrary number of elements in it. So I figured
I would use $.post, HOWEVER, I'm sure how I would convert my array
into a suitable data-string?

$.post(test.php, data);  what should data be when I want to pass
an entire array?

I looked around a bit on Google and I found the function serialize
which seems to do what I want. But it only works on forms and not on
arrays...

thx


[jQuery] Re: Breadcumb, error in for-loop

2009-09-26 Thread Althalos

I'm not an expert either, so I may be wrong. But I doubt that BrCU
really gives you what you want. find(a:first) will give you ONE
element by definition... it will not return an array of elements. I
think. Probably you need to do something like this:
var el = ;
var BrCu = here.parents('li');
BrCu.each(function () {
el = $(this).find(a:first);
bc += gt;+el;
});

This will probably not work straight off... but now bc will hold all
of the a elements...

On 26 Sep, 11:44, Geir gso...@frisurf.no wrote:
 Hi!
 I'm not an expert in js, maybe you can help me with this one:

         var BrCu = here.parents('li').find(a:first);
         for (i=3; i=0; i--){
         if (BrCU[i] != undefined){
         $('#breadcumb span.ins').html('gt;' + BrCu[i]);
         }
         };

 BrCu gives me what I want. But the for-loop is not writing anything to
 the page.
 Have I misunderstood something?

 var here is current location in a navigation-menu (ul li a ul li a ..)

 Thanks!


[jQuery] Autocomplete plugin - customization

2009-09-14 Thread Althalos

Hi
I'm trying to make a custom hack to the autocomplete plugin. I want it
so that when you select a suggestion I can separate the data in that
suggestion and insert parts of it into four different elements.

I'll use split to get the data into an array and then use the Val
function to set the values of the elements, but what is the easiest
way to customize theplugon like this? Can I do this wihout editing the
plugn itself?


[jQuery] Handling result from the autocomplete plugin

2009-09-13 Thread Althalos

Hello
I'm using the following autocomplete plugin: 
http://docs.jquery.com/Plugins/Autocomplete

It's getting its data from an array, here are the first couple of
values:
data[0] = Magnesium (s) | R: 11, 15 | S: 7/8, 43;
data[1] = Saltsyra 4M (aq) | R: 36/38 | S: 2. 28;
data[2] = Natriumnitrat | NaNO3 | R: 8, 22;

I have four different input elements:
- Name, which triggers the autocomplete
- three other ones

When the user enters something in name and the choses one of the
autosuggested lines, I don't want it to put that entire name into the
input window. I to ONLY put the name into it, the name is always the
first part of the string, the part before the first |.

Then I want to put the information between the first | and the second
| into the second input box, the information between the second and
third | into the third box, and the information left in the string I
want to put into a fourth input element.

How can this easiest be achieved?


[jQuery] trouble with post function

2009-03-21 Thread Althalos

Hello. I've had this trouble all night and I can fix it I am using
the code below and if I take away the arguments I want to pass, then
it works fine and I get a result back from the script. However, when I
try to pass the form values and the slider values (from the UI slider)
to the script the callback function never executes. Anyone know why?

$(#slider).slider({
value:6,
min: 1,
max: 6,
step: 1,
change: function(event, ui) {
  $(#environment).val(ui.value);
  var bensinp = $(input[name=bensin]).val();
  var biogasp = $(input[name=biogas]).val();
  var dieselp = $(input[name=diesel]).val();
  var e85p = $(input[name=e85]).val();
  var naturgasp = $(input[name=naturgas]).val();
  var rapsbränslep = $(input[name=rapsbränsle]).val();
  var envv = $(#slider2).slider(value);
  var pric = $(#slider).slider(value);
  $.post(rankfuels.php, {
bensin : bensinp,
biogas : biogasp,
diesel : dieselp,
e85 : e85p,
naturgas : naturgasp,
rapsbränsle : rapsbränslep,
environment : envv,
price : pric
}, function (data) {
$(#fuelranking).html(data);
});
  }
});


[jQuery] Callback function not working

2009-01-24 Thread Althalos

Hello, I have a callback function belonging to a $.post that won't
work. Anyone know why? This is my function:

function(date) {
$(#date_+$(this).attr(id)).html(Updating..);
$.post(includes/updateleverans.php,{id:$(this).attr(id),
date:date},
function (data) {
$(#date_+$(this).attr(id)).html(Done!);
});
}

This is my php:
?php
include (db_connect.inc);
$date = str_replace(-, /, $_POST['date']);
$id = $_POST['id'];
mysql_query(UPDATE prot_orders SET due_date = '$date' WHERE id =
'$id');
echo ($date);
?

The MySQL query executes SUCCESFULLY and $date is set correctly..
please anyone?


[jQuery] Re: Callback function not working

2009-01-24 Thread Althalos

and also $(#date_+$(this).attr(id)).html(Updating..); works
fine!

On 24 Jan, 16:39, Althalos ca...@ekdahlproduction.com wrote:
 Hello, I have a callback function belonging to a $.post that won't
 work. Anyone know why? This is my function:

 function(date) {
     $(#date_+$(this).attr(id)).html(Updating..);
     $.post(includes/updateleverans.php,{id:$(this).attr(id),
 date:date},
     function (data) {
     $(#date_+$(this).attr(id)).html(Done!);
     });
     }

 This is my php:
 ?php
 include (db_connect.inc);
 $date = str_replace(-, /, $_POST['date']);
 $id = $_POST['id'];
 mysql_query(UPDATE prot_orders SET due_date = '$date' WHERE id =
 '$id');
 echo ($date);
 ?

 The MySQL query executes SUCCESFULLY and $date is set correctly..
 please anyone?


[jQuery] Re: Code not working in IE but is working in FF

2008-12-28 Thread Althalos

Nope. I tried that but I still got the same result, works in FF but
not in IE =(

On 28 Dec, 10:32, Alexandre Plennevaux aplennev...@gmail.com
wrote:
  Maybe try a named function instead of an anonymous one ? so avoiding
 arguments.callee by using your function name instead?

 On Sun, Dec 28, 2008 at 2:03 AM, Althalos ca...@ekdahlproduction.com wrote:

  Nope, I'm sorry but that doesn't seem to work. Note that setting
  opacity to zero works in both browsers.

  On 28 Dec, 01:25, Alexandre Plennevaux aplennev...@gmail.com
  wrote:
  really not sure, but maybe try

  A/

  1- (step/1)  instead of 1-step/1

  B/

  $(#slogan).css('opacity',0);  instead of $(#slogan).css('opacity','0');

  On Sun, Dec 28, 2008 at 1:04 AM, Althalos ca...@ekdahlproduction.com 
  wrote:

   I posted something similarly before but I posted wrong code. This
   time, everything is correct and I'll provide all the information
   needed.

   First of all, the URL to the site which is not working is
  http://uf.ekdahlproduction.com/itsvintage2/

   The error: In FF everything works perfectly but in IE it gets stuck on
   1% and nothing happens whatsoever.

   The code:
   $(document).ready(function(){
      $(#slogan).css('opacity','0');
      var step = 1;
     (function(){
        step -= 100;
        $(#percentage).text(100-step/100 + '%');
        if ( step  0 )
           $(#logo).fadeTo(100,1-step/1, arguments.callee);
           else window.location = http://uf.ekdahlproduction.com/
   itsvintage2/home.html;
        if ( step == 3500 )
          $(#slogan).fadeTo(3500,1);
     })();

   });

   Comments: I have noticed that it changes the opacity correctly, and
   also sets the content of #percentage to 1%, therefore Jquery must be
   working. Maybe this can be some kind of general javascript error?
   Something that IE interprets differently than FF?

   Thank you


[jQuery] Re: Code not working in IE but is working in FF

2008-12-28 Thread Althalos

Srry for my first reply to this message. It DOES work if one remove
the anonymity. One has also to remove ( function ) () in favor of an
initiating functionname() instead =)

On 28 Dec, 10:32, Alexandre Plennevaux aplennev...@gmail.com
wrote:
  Maybe try a named function instead of an anonymous one ? so avoiding
 arguments.callee by using your function name instead?

 On Sun, Dec 28, 2008 at 2:03 AM, Althalos ca...@ekdahlproduction.com wrote:

  Nope, I'm sorry but that doesn't seem to work. Note that setting
  opacity to zero works in both browsers.

  On 28 Dec, 01:25, Alexandre Plennevaux aplennev...@gmail.com
  wrote:
  really not sure, but maybe try

  A/

  1- (step/1)  instead of 1-step/1

  B/

  $(#slogan).css('opacity',0);  instead of $(#slogan).css('opacity','0');

  On Sun, Dec 28, 2008 at 1:04 AM, Althalos ca...@ekdahlproduction.com 
  wrote:

   I posted something similarly before but I posted wrong code. This
   time, everything is correct and I'll provide all the information
   needed.

   First of all, the URL to the site which is not working is
  http://uf.ekdahlproduction.com/itsvintage2/

   The error: In FF everything works perfectly but in IE it gets stuck on
   1% and nothing happens whatsoever.

   The code:
   $(document).ready(function(){
      $(#slogan).css('opacity','0');
      var step = 1;
     (function(){
        step -= 100;
        $(#percentage).text(100-step/100 + '%');
        if ( step  0 )
           $(#logo).fadeTo(100,1-step/1, arguments.callee);
           else window.location = http://uf.ekdahlproduction.com/
   itsvintage2/home.html;
        if ( step == 3500 )
          $(#slogan).fadeTo(3500,1);
     })();

   });

   Comments: I have noticed that it changes the opacity correctly, and
   also sets the content of #percentage to 1%, therefore Jquery must be
   working. Maybe this can be some kind of general javascript error?
   Something that IE interprets differently than FF?

   Thank you


[jQuery] Code not working in IE but is working in FF

2008-12-27 Thread Althalos

I posted something similarly before but I posted wrong code. This
time, everything is correct and I'll provide all the information
needed.

First of all, the URL to the site which is not working is
http://uf.ekdahlproduction.com/itsvintage2/

The error: In FF everything works perfectly but in IE it gets stuck on
1% and nothing happens whatsoever.

The code:
$(document).ready(function(){
$(#slogan).css('opacity','0');
var step = 1;
   (function(){
  step -= 100;
  $(#percentage).text(100-step/100 + '%');
  if ( step  0 )
 $(#logo).fadeTo(100,1-step/1, arguments.callee);
 else window.location = http://uf.ekdahlproduction.com/
itsvintage2/home.html;
  if ( step == 3500 )
$(#slogan).fadeTo(3500,1);
   })();

});

Comments: I have noticed that it changes the opacity correctly, and
also sets the content of #percentage to 1%, therefore Jquery must be
working. Maybe this can be some kind of general javascript error?
Something that IE interprets differently than FF?

Thank you


[jQuery] Re: Code not working in IE but is working in FF

2008-12-27 Thread Althalos

Nope, I'm sorry but that doesn't seem to work. Note that setting
opacity to zero works in both browsers.

On 28 Dec, 01:25, Alexandre Plennevaux aplennev...@gmail.com
wrote:
 really not sure, but maybe try

 A/

 1- (step/1)  instead of 1-step/1

 B/

 $(#slogan).css('opacity',0);  instead of $(#slogan).css('opacity','0');

 On Sun, Dec 28, 2008 at 1:04 AM, Althalos ca...@ekdahlproduction.com wrote:

  I posted something similarly before but I posted wrong code. This
  time, everything is correct and I'll provide all the information
  needed.

  First of all, the URL to the site which is not working is
 http://uf.ekdahlproduction.com/itsvintage2/

  The error: In FF everything works perfectly but in IE it gets stuck on
  1% and nothing happens whatsoever.

  The code:
  $(document).ready(function(){
     $(#slogan).css('opacity','0');
     var step = 1;
    (function(){
       step -= 100;
       $(#percentage).text(100-step/100 + '%');
       if ( step  0 )
          $(#logo).fadeTo(100,1-step/1, arguments.callee);
          else window.location = http://uf.ekdahlproduction.com/
  itsvintage2/home.html;
       if ( step == 3500 )
         $(#slogan).fadeTo(3500,1);
    })();

  });

  Comments: I have noticed that it changes the opacity correctly, and
  also sets the content of #percentage to 1%, therefore Jquery must be
  working. Maybe this can be some kind of general javascript error?
  Something that IE interprets differently than FF?

  Thank you


[jQuery] Re: working in FF but not in IE

2008-12-25 Thread Althalos

http://uf.ekdahlproduction.com/itsvintage2/

On 24 Dec, 15:46, Rick Faircloth r...@whitestonemedia.com wrote:
 I'd like to take a peek...what's the URL?

  -Original Message-
  From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
  Behalf Of Althalos
  Sent: Wednesday, December 24, 2008 3:54 AM
  To: jQuery (English)
  Subject: [jQuery] Re: working in FF but not in IE

  I really don't want to use this for this intro, actually I would've
  wanted to make the entire website in flash but I don't know it so here
  I go... however, I can't seem to make that code work. Nothing happens,
  so that suggests, I guess, some kind of syntax error along the
  way. anyone?

  On 24 Dec, 06:38, Ricardo Tomasi ricardob...@gmail.com wrote:
   oh god is that a flash-like intro movie with JS?

   three words of advice:
   1. don't do it!
   2. don't do it!
   3. use flash for flashy!

   Anyway, that's a lot of overhead, you can simply fade the element and
   update the percentage regularly:

   $(document).ready(function(){

     var per = $('#percentage'),
          logo = $('#logo').fadeTo(2000,0, function(){
             per.fadeTo('slow',0, function(){
                 per.text('For life - for fashion - for life').fadeTo
   ('slow',1);
             });
         }),
     function update(){
        var o = Math.floor( logo.css('opacity')*100 );
        s.text( o );
        if (o) setTimeout(update,30);
     }
     update();

   });

   - ricardo

   On Dec 23, 8:24 pm, Althalos ca...@ekdahlproduction.com wrote:

So I got help to create a script this far:
$(document).ready(function(){
    var step = 4000;
   (function(){
      step -= 40;
      $(#percentage).text(Math.round((1-step/4000)*100) + '%');
      if ( step  0 )
         $(#logo).fadeTo(40,1-step/4000, arguments.callee);
   })();
  setTimeout(function () {
  $(#percentage).fadeTo(slow,0.01, function () {
  $(#percentage).text(For life - for fashion - for life).fadeTo
(slow,1);
  });
  },6000);
  setTimeout(function () {
  window.location = 'http://uf.ekdahlproduction.com/itsvintage2/
home.html';
  },8000);

});

At first it seemed to work like a charm, and it really did in FF, but
then in IE it didn't work much at all. Both logo-opacity and
percentage got stuck, at low opacity and 1%. However, it still
replaced the text and faded in/out and continued onto the next page
correctly.

How can I make the fade-in logo update percentage thingy work
correctly in IE?


[jQuery] Re: working in FF but not in IE

2008-12-24 Thread Althalos

I really don't want to use this for this intro, actually I would've
wanted to make the entire website in flash but I don't know it so here
I go... however, I can't seem to make that code work. Nothing happens,
so that suggests, I guess, some kind of syntax error along the
way. anyone?

On 24 Dec, 06:38, Ricardo Tomasi ricardob...@gmail.com wrote:
 oh god is that a flash-like intro movie with JS?

 three words of advice:
 1. don't do it!
 2. don't do it!
 3. use flash for flashy!

 Anyway, that's a lot of overhead, you can simply fade the element and
 update the percentage regularly:

 $(document).ready(function(){

   var per = $('#percentage'),
        logo = $('#logo').fadeTo(2000,0, function(){
           per.fadeTo('slow',0, function(){
               per.text('For life - for fashion - for life').fadeTo
 ('slow',1);
           });
       }),
   function update(){
      var o = Math.floor( logo.css('opacity')*100 );
      s.text( o );
      if (o) setTimeout(update,30);
   }
   update();

 });

 - ricardo

 On Dec 23, 8:24 pm, Althalos ca...@ekdahlproduction.com wrote:

  So I got help to create a script this far:
  $(document).ready(function(){
      var step = 4000;
     (function(){
        step -= 40;
        $(#percentage).text(Math.round((1-step/4000)*100) + '%');
        if ( step  0 )
           $(#logo).fadeTo(40,1-step/4000, arguments.callee);
     })();
    setTimeout(function () {
    $(#percentage).fadeTo(slow,0.01, function () {
    $(#percentage).text(For life - for fashion - for life).fadeTo
  (slow,1);
    });
    },6000);
    setTimeout(function () {
    window.location = 'http://uf.ekdahlproduction.com/itsvintage2/
  home.html';
    },8000);

  });

  At first it seemed to work like a charm, and it really did in FF, but
  then in IE it didn't work much at all. Both logo-opacity and
  percentage got stuck, at low opacity and 1%. However, it still
  replaced the text and faded in/out and continued onto the next page
  correctly.

  How can I make the fade-in logo update percentage thingy work
  correctly in IE?


[jQuery] intro using fadeTo and setTimeout won't work

2008-12-23 Thread Althalos

I've been trying for a week and spent endless hours on a tiny little
code, and I cannot take any more of it so please help... code nr 1.
not working, but I think should:

$(document).ready(function(){
$(#logo).css('opacity','0.01');
for (var i = 1; i0; i-=100) {
setTimeout(function() {
$(#logo).fadeTo(fast,1-i/1);
$(#percentage).html(i/100 + '%');
  },i);
}
});

Code nr 2. not working, but I think should (it's supposed to do the
same thing as the one above):
function changeFade(i)
{
$(#logo).fadeTo(fast,1-i/1);
$(#percentage).html(i/100 + '%');
i += 100;
if (i=1)
setTimeout(changeFade(i),100);
}

$(document).ready(function(){
alert('test');
$(#logo).css('opacity','0.01');
changeFade(100);
}

I have to div and I start out by rendering one of them invisible,
then I continually update the percentage as the image fades in. What
is wrong with this?


[jQuery] Re: intro using fadeTo and setTimeout won't work

2008-12-23 Thread Althalos

It works like a charm! Thanks a lot! =)

On 23 Dec, 16:24, Dave Methvin dave.meth...@gmail.com wrote:
  function changeFade(i)
  {
    $(#logo).fadeTo(fast,1-i/1);
    $(#percentage).html(i/100 + '%');
    i += 100;
    if (i=1)
      setTimeout(changeFade(i),100);
  }
  $(document).ready(function(){
    alert('test');
    $(#logo).css('opacity','0.01');
    changeFade(100);
  }

 You need to wait until the fadeTo is done before continuing on to the
 next step; neither one of those waits. This one-liner will give you a
 linear 10-second fade-in:

 $(#logo).hide().fadeIn(1);

 Is the problem that you need to display the percentage as it fades in?
 If so, try this:

 $(document).ready(function(){
     var step = 1;
    (function(){
       step -= 100;
       $(#percentage).text(step/100 + '%');
       if ( step  0 )
          $(#logo).fadeTo(100,1-step/1, arguments.callee);
    })();

 });

 Because of overhead issues, that will most likely end up running
 longer than 10 seconds but if it's just a visual effect it won't
 matter.


[jQuery] working in FF but not in IE

2008-12-23 Thread Althalos

So I got help to create a script this far:
$(document).ready(function(){
var step = 4000;
   (function(){
  step -= 40;
  $(#percentage).text(Math.round((1-step/4000)*100) + '%');
  if ( step  0 )
 $(#logo).fadeTo(40,1-step/4000, arguments.callee);
   })();
  setTimeout(function () {
  $(#percentage).fadeTo(slow,0.01, function () {
  $(#percentage).text(For life - for fashion - for life).fadeTo
(slow,1);
  });
  },6000);
  setTimeout(function () {
  window.location = 'http://uf.ekdahlproduction.com/itsvintage2/
home.html';
  },8000);
});

At first it seemed to work like a charm, and it really did in FF, but
then in IE it didn't work much at all. Both logo-opacity and
percentage got stuck, at low opacity and 1%. However, it still
replaced the text and faded in/out and continued onto the next page
correctly.

How can I make the fade-in logo update percentage thingy work
correctly in IE?


[jQuery] Re: link fade in / out

2008-11-12 Thread Althalos

*bump*

On 11 Nov, 19:15, Althalos [EMAIL PROTECTED] wrote:
 Hi. I have a menu consisting of some simple text links. They start
 with an opacity of 0.33 then when I move my mouse over them they lit
 up. They worked well, however the effects wanted to stack up in a
 queue so that when I had swept my mouse over the links a couple of
 times fast they would keep fading in and fading out as many times as I
 had swept my mouse over them.

 What I want is a link that lights up when you move the mouse across
 it, then fades down and keeps faded out until I sweep my mouse over it
 again. So I added .stop, which didn't work to well. I was hoping
 someone would correct me. What happens right now is that sometimes
 (often) links get stopped in the middle, with an opacity which is
 neither 0.33 nor 1. Also some links freeze and don't respond to moue
 hover... thank you.

 $(a).hover(function(){
   $(this).fadeTo(500,1);
   }, function() {
   $(this).fadeTo(300,0.33, function () {
     $(this).stop({gotoEnd:true});
   });
   });


[jQuery] Re: link fade in / out

2008-11-12 Thread Althalos

No... it does the same thing that the hover function does =(
I don't want stuff to be added to the queue, the queue should have at
most 1 item at the time.. thanks for your answer though. Anyone else?

On 12 Nov, 10:04, Liam Potter [EMAIL PROTECTED] wrote:
 not entirely sure if it will work this way but try

 $(a).bind(mouseenter,function(){
  $(this).fadeTo(500,1);
  }

 });

 $(a).bind(mouseleave,function() {
  $(this).fadeTo(300,0.33);
  });

 Althalos wrote:
  *bump*

  On 11 Nov, 19:15, Althalos [EMAIL PROTECTED] wrote:

  Hi. I have a menu consisting of some simple text links. They start
  with an opacity of 0.33 then when I move my mouse over them they lit
  up. They worked well, however the effects wanted to stack up in a
  queue so that when I had swept my mouse over the links a couple of
  times fast they would keep fading in and fading out as many times as I
  had swept my mouse over them.

  What I want is a link that lights up when you move the mouse across
  it, then fades down and keeps faded out until I sweep my mouse over it
  again. So I added .stop, which didn't work to well. I was hoping
  someone would correct me. What happens right now is that sometimes
  (often) links get stopped in the middle, with an opacity which is
  neither 0.33 nor 1. Also some links freeze and don't respond to moue
  hover... thank you.

  $(a).hover(function(){
    $(this).fadeTo(500,1);
    }, function() {
    $(this).fadeTo(300,0.33, function () {
      $(this).stop({gotoEnd:true});
    });
    });


[jQuery] link fade in / out

2008-11-11 Thread Althalos

Hi. I have a menu consisting of some simple text links. They start
with an opacity of 0.33 then when I move my mouse over them they lit
up. They worked well, however the effects wanted to stack up in a
queue so that when I had swept my mouse over the links a couple of
times fast they would keep fading in and fading out as many times as I
had swept my mouse over them.

What I want is a link that lights up when you move the mouse across
it, then fades down and keeps faded out until I sweep my mouse over it
again. So I added .stop, which didn't work to well. I was hoping
someone would correct me. What happens right now is that sometimes
(often) links get stopped in the middle, with an opacity which is
neither 0.33 nor 1. Also some links freeze and don't respond to moue
hover... thank you.

$(a).hover(function(){
  $(this).fadeTo(500,1);
  }, function() {
  $(this).fadeTo(300,0.33, function () {
$(this).stop({gotoEnd:true});
  });
  });


[jQuery] Re: My menu divs get behind content when shown on IE

2008-11-11 Thread Althalos

No IE is the culprit. It won't accept certain z-values and it's a mess
to work with, thus. Google to find some of the specifics for IE 6 and
z-index and see if any of them applies. For example I know that IE
won't accept negative z-values while the other browsers at least won't
act weird because of them.

On 6 Nov, 23:03, FG [EMAIL PROTECTED] wrote:
 Thanks. A high z value solved the issue.

 But in IE6 still can not get those divs to show. Will try without
 jQuery to see if it's the culprit.

 FG

 On Nov 6, 2:39 pm, Althalos [EMAIL PROTECTED] wrote:

  It doesn't work in Firefox for me... and I don't think it should. I
  had this problem as well with an autocomplete thingy, and I solved it
  using z-index so try that. Set it to 100 or something on your menu
  div.

  On 6 Nov, 20:29, FG [EMAIL PROTECTED] wrote:

   I'm using jQuery for showing hidden menus on this 
   page:http://www.guadalajaracinemafest09.com/es/

   Every browser behaves correctly, showing the yellow menus when
   clicking on the navigation bar. IE shows the content but _beneath_ the
   content of the other divs.

   Is this jQuery related? or will I need to use a CSS property like z-
   index for showing then above the content?

   Thanks,
   FG.


[jQuery] Re: combining slideup, post, slidedown

2008-11-09 Thread Althalos

Nope. Can't make that work either. I now have:
$(document).ready(function(){
  $(a).fadeTo(500,0.33);
  $(a).hover(function(){
  $(this).fadeTo(500,1);
  }, function() {
  $(this).fadeTo(300,0.33);
  });
  $(#content).fadeTo(10,0.5);
  $(a).click (function(event) {
  event.preventDefault();
  $(#content).slideUp('slow', function () {
  $.post('http://uf.ekdahlproduction.com/itsvintage/text.php',
{site: $(this).attr('rel')}, function(data) {
  $(#content).html(data);
  $(#content).slideDown('slow');
  });
});
});
});

And it's not actually cross-domain, it's just the way I wrote it for
some reason ^^

On 9 Nov, 02:51, Karl Swedberg [EMAIL PROTECTED] wrote:
 surprised that the $.post is working since it looks like you're trying  
 to do a cross-domain request, but anyway, the problem could be that  
 you don't have a return false or preventdefault() anywhere. Try this:

 $(a).click (function(event) {
         event.preventDefault();

         // rest of your code ...

 --Karl

 
 Karl Swedbergwww.englishrules.comwww.learningjquery.com

 On Nov 8, 2008, at 8:47 PM, Althalos wrote:



  Hi. I am trying to make a div slide up, update through $.post and then
  slide down again. I have the following code:
   $(a).click (function() {
           $(#content).slideUp('slow', function () {
           $.post('http://uf.ekdahlproduction.com/itsvintage/text.php',
  {site: $(this).attr('rel')}, function(data) {
           $(#content).html(data);
           $(#content).slideDown('slow');
           });
  });
  });

  However, the div just goes up and down without any content on it. Can
  anyone help me sort this out?

  (I know the post thingy is working, because it works if I write the
  $.post and its callback outside the callback function of slideUp.
  Then, however, it will be possible to see the new content when it's
  still on its way up)

  thank you


[jQuery] combining slideup, post, slidedown

2008-11-08 Thread Althalos

Hi. I am trying to make a div slide up, update through $.post and then
slide down again. I have the following code:
  $(a).click (function() {
  $(#content).slideUp('slow', function () {
  $.post('http://uf.ekdahlproduction.com/itsvintage/text.php',
{site: $(this).attr('rel')}, function(data) {
  $(#content).html(data);
  $(#content).slideDown('slow');
  });
});
});

However, the div just goes up and down without any content on it. Can
anyone help me sort this out?

(I know the post thingy is working, because it works if I write the
$.post and its callback outside the callback function of slideUp.
Then, however, it will be possible to see the new content when it's
still on its way up)

thank you


[jQuery] Re: My menu divs get behind content when shown on IE

2008-11-06 Thread Althalos

It doesn't work in Firefox for me... and I don't think it should. I
had this problem as well with an autocomplete thingy, and I solved it
using z-index so try that. Set it to 100 or something on your menu
div.

On 6 Nov, 20:29, FG [EMAIL PROTECTED] wrote:
 I'm using jQuery for showing hidden menus on this 
 page:http://www.guadalajaracinemafest09.com/es/

 Every browser behaves correctly, showing the yellow menus when
 clicking on the navigation bar. IE shows the content but _beneath_ the
 content of the other divs.

 Is this jQuery related? or will I need to use a CSS property like z-
 index for showing then above the content?

 Thanks,
 FG.


[jQuery] Re: Show Function Disappering

2008-11-06 Thread Althalos

Example is right here: http://docs.jquery.com/Effects/show

How are you hiding your div? It should (preferably) be done using css
display:none; ... and then you have to make sure that what you do
doesn't conflict with anything else you might've put on there.. which
we can't know because you didn't post any code..

On 6 Nov, 20:54, jquerist [EMAIL PROTECTED] wrote:
 So Im just starting to learn JQuery and im making a simple webpage
 that hides a paragraph when the page opens and then you click a link
 to view that paragraph. However when i run the script, the paragraph
 comes on for a second and then disappears. I searched for a fix and i
 havent found anything yet, so i came here.

 Im using the newest version of Jquery (1.2.6)

 Any help would be appreciated.

 Thanks