[jQuery] Re: Does the JQuery Ajax and load work properly? It seems to work like an iframe rather than like add html in FF, Opera, Chrome, but works as I would expect in IE

2008-11-08 Thread Mike Alsup

 http://docs.jquery.com/Ajax/load#urldatacallback

 Click on one of the links in FF 3.0.3 or Chrome and instead of
 redirecting the entire window, it just redirects the content within
 the ul tags.  However, do it in IE and it redirects the browser window
 properly.  To me the ie functionality makes the most sense if we are
 just loading in pure html tags.

 I am trying to use this in a project but when I load any content that
 contains link in ajax, the link only changes the content of the
 containing div rather than changing the page.


I can't figure out what you're talking about because those demos work
exactly the same for me in IE, FF,Chrome and Safari.  As a matter of
design, the demo pages use IFrames.  That's why when you click the
view source tab you can see the entire document used in the
example.  The IE behavior that you describe would certainly not be
correct for this situation, although I cannot duplicate it.  Note that
any link within an IFrame that uses the 'target' attribute
(target=_top) would cause the behavior you describe.

Mike


[jQuery] [London Beers] Is anyone from London?

2008-11-08 Thread nmiddleweek

Hello,

Sorry for the off-topic message but does anyone on the list work or
live in London?

I've recently started working for myself and thought it'd be a good
idea to meet others working with similar tools and in general just
have a few beers.


Cheers,
N


[jQuery] Ready event is getting fired - each time i click on a link in the page

2008-11-08 Thread mpuli

Hi All,
 I am newbie to this group as well as to jquery. I am running the
below code

---
!--
To change this template, choose Tools | Templates
and open the template in the editor.
--
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
html
  head
title Page with Gadgets/title
meta http-equiv=Content-Type content=text/html;
charset=UTF-8
script type=text/javascript language=javascript
src=jquery-1.2.6.min.js /script

script type=text/javascript

$(document).ready(function(){
//Hide all the images
$(img:not(first)).hide();

//Only on click of Tirumala Arch show the figure
$(a#tpt).click(function()
{
$(img#firstimg).show();
});

//Only on click of Sahara Fort1 show the figure
$(a#sahara1).click(function()
{
$(img#secondimg).show();

});

//Only on click of Sahara Fort2 show the figure
$(a#sahara2).click(function()
{
$(img#thirdimg).show();
});
});

  /script
  /head
  body

table id=details border=1 
thead
tr
thImage Name/th
thImage/th
/tr
/thead
tbody
tr
td
a id=tpt href=Tirumala Arch/a
/td
td
img id =firstimg src=./Images/
Tirumala_natural_stone_arch.jpg width=500 height=375
alt=Tirumala_natural_stone_arch/
/td
/tr
tr
td
a id=sahara1 href=Sahara Fort1/a
/td
td
img id =secondimg src=./Images/300px-
Rainbow_Bridge.jpg width=500 height=375
alt=Tirumala_natural_stone_arch/
/td
/tr
tr
td
a id=sahara2 href=Sahara Fort2/a
/td
td
 img id =thirdimg src=./Images/
514032779_06.jpg width=500 height=375
alt=Tirumala_natural_stone_arch/
/td
/tr
/tbody
/table

  /body
/html
---

My objective is to hide all the images except the first one in the
table and show them only if i click on the link associated with the
image. But what is happening is all the images are getting hidden,
which i donot want.

Also when i click on the link the image will be displayed for a split
of a second but disappears because the page is getting loaded and
hence the ready event is getting called again. Please let me know if
there is anything wrong with the code.

Thanks,
--Mayur


[jQuery] Jquery on Joomla

2008-11-08 Thread pelletalexandre

Hello

I'm using Jquery into Joomla.

I'va got a problem when thru many modules, when jquery is includes
more than one time.

Only the last module work fine and the first don't.

So,  how can i know if the jquery library is already loaded in order
to not include it one more time?

thanks.

Regards

Alexandre


[jQuery] Re: loading an array via Ajax

2008-11-08 Thread Brad

This thread contains the answer to my question:

http://groups.google.com/group/jquery-en/browse_thread/thread/db0fb4fabce6630b/5eb2c5ac8b7f46f7?lnk=gstq=getJSON#5eb2c5ac8b7f46f7

On Nov 7, 4:40 pm, Brad [EMAIL PROTECTED] wrote:
 I have a case where I need to have a few global arrays and/or objects
 which will be used by numerous scripts. One example would be as a
 local lookup source for an autocompleter, while the same data might be
 used to populate a selection menu. The data isn't likely to change
 during a user's session, but might.

 I can get this data remotely every time I need it, but I'm hitting
 some performance problems in doing so.

 What I'd like to do is load these arrays/objects on page load, but
 make them globally accessible to other scripts for fast lookup. I also
 would like to do this in a generic fashion that would allow me to
 reload those arrays or objects if needed.

 I'm stumped on how to do this though?

 .getJSON? One of the other jQuery Ajax functions?

 Where I'm lost is that the array or object would be populated in a
 callback. Do to scoping, I don't see how to make it global?


[jQuery] Tablesorter advice required - row level filtering based on inputs?

2008-11-08 Thread rich

Hello.
I'm here for advice on which approach to take with this problem.

I am using the wonderful tablesorter 2 plugin (http://
tablesorter.com/).

I have a table that contains data. I'd like to provide an input field
above the table so that a user can filter rows based on a string
matched from one particular column.

Is this something I could implement as an add-on to tablesorter or am
I better off keeping this functionality altogether separate.

Hope that makes sense.

Thanks for reading
Richard


[jQuery] Re: loading an array via Ajax

2008-11-08 Thread Waseem Javed

hi The affiliation program enables any active member to recieve
rewards on the purchases of your affiliates. It is easy to earn money
promoting Fotolia, simply send a link with your partner id and
encourage everyone to join. This page contains many ideas and links to
help you earn money. Recommend Fotolia to your friends and associates.
please sign up this link Contact us to learn more about the Fotolia API.
Click here to learn more about the Fotolia API
http://www.fotolia.com/partner/200850913

GREAT WAY TO EARN HUGE MONEY FROM ONLINE affilated sites please join
and earn money urgently urgently. Welcome to A.W.Surveys!
We would like to thank you for being part of A.W.Surveys. With your
help we are one of the fastest growing survey companies in the world.
We are proud that our Web Site Evaluations are helping change how the
web looks. We believe we have the best survey takers in the world,
which is why we value and pay so much for your evaluations.
The $500 Monthly Bonus cash prize for October has ended. The winner
for October is GinaMa! Congratulations!
11/1/2008 - The November Bonus Contest has started. Please remember
you receive $1 for completing this survey and will also be entered
into our $500 Monthly Contest.

http://www.AWSurveys.com/HomeMain.cfm?RefID=waseem 123
a href=http://www.AWSurveys.com/HomeMain.cfm?RefID=waseem 123
$6.00 Welcome Survey After Free Registration!/a
Hi if u guys love to read interesting stories so check out my site
http://www.elbowfriends.com.
 There are many nice and interesting love stories over there.And if u
guys want to add a new story of ur ownthen u can send ur own created
stories on my site contact tab.

ReferForex is a top in-house Forex affiliate program, offering
affiliates the opportunity to earn commission by referring traders to
our sites, www.finexo.com and www.forexwebtrader.com.
The Forex market is thriving with an estimated daily turnover of 3
trillion U.S. dollars. The earning potential of a Forex affiliate is
tremendous. Join our program and be rewarded for promoting the Forex
market's finest trading platforms.
Our program ensures that affiliates receive highly lucrative
commissions through our various commission structures. We provide our
affiliates every tool necessary for a productive and profitable
partnership.

Become a ReferForex Affiliate today, and join ranks with the program that pays!
!-- Affiliate Code Do NOT Modify--a
href=http://system.referforex.com/processing/clickthrgh.asp?btag=a_5389b_3148;
 target=_blankFall into Foreximg
src=http://system.referforex.com/processing/impressions.asp?btag=a_5389b_3148;
width=0 height=0 border=0/a!-- End affiliate Code--

!-- Affiliate Code Do NOT Modify--a
href=http://system.referforex.com/processing/clickthrgh.asp?btag=a_5389b_3200;
 target=_blankJPost Popunderimg
src=http://system.referforex.com/processing/impressions.asp?btag=a_5389b_3200;
width=0 height=0 border=0/a!-- End affiliate Code--

andAssociates Alerts
New Improved Associates Central
Welcome to the new Associates Central! We've been listening to your
feedback over the last year and we hope you'll find these changes
improve your experience as an Amazon Associates customer and help you
increase your ability to make money through the Amazon Associates
program.
What's new:
Site Stripe: Site Stripe lets you build Associates links directly from
the Amazon.com website so you can update your website more frequently,
with fewer clicks and less time. Next time you go to Amazon.com you
will see the Site Stripe at the top of any Amazon page you visit.
Linking to Amazon.com and Endless.com: Explore a variety of links and
widgets with our new design that helps you discover products to
advertise that will work best for your website and your customers,
including product links and banners.
A new look: Our improved website design makes it easier for you to
navigate through the Associates Central website to find the
information you need with fewer clicks.
Click on the Get Started Tour now, or explore the site on your own!
And as always, we'd love to hear your feedback.


a 
href=http://www.amazon.com/gp/redirect.html?ie=UTF8location=http%3A%2F%2Fwww.amazon.com%2Fcomputer-video-games-hardware-accessories%2Fb%3Fie%3DUTF8%26node%3D468642%26ref%255F%3Dsa%255Fmenu%255Fcvg1tag=elbowfriends-20linkCode=ur2camp=1789creative=390957;Name
Your Link/aimg
src=https://www.assoc-amazon.com/e/ir?t=elbowfriends-20amp;l=ur2amp;o=1;
width=1 height=1 border=0 alt= style=border:none !important;
margin:0px !important; /


[jQuery] Re: jCarousel, localScroll, other options?

2008-11-08 Thread Waseem Javed

hi The affiliation program enables any active member to recieve
rewards on the purchases of your affiliates. It is easy to earn money
promoting Fotolia, simply send a link with your partner id and
encourage everyone to join. This page contains many ideas and links to
help you earn money. Recommend Fotolia to your friends and associates.
please sign up this link Contact us to learn more about the Fotolia API.
Click here to learn more about the Fotolia API
http://www.fotolia.com/partner/200850913

GREAT WAY TO EARN HUGE MONEY FROM ONLINE affilated sites please join
and earn money urgently urgently. Welcome to A.W.Surveys!
We would like to thank you for being part of A.W.Surveys. With your
help we are one of the fastest growing survey companies in the world.
We are proud that our Web Site Evaluations are helping change how the
web looks. We believe we have the best survey takers in the world,
which is why we value and pay so much for your evaluations.
The $500 Monthly Bonus cash prize for October has ended. The winner
for October is GinaMa! Congratulations!
11/1/2008 - The November Bonus Contest has started. Please remember
you receive $1 for completing this survey and will also be entered
into our $500 Monthly Contest.

http://www.AWSurveys.com/HomeMain.cfm?RefID=waseem 123
a href=http://www.AWSurveys.com/HomeMain.cfm?RefID=waseem 123
$6.00 Welcome Survey After Free Registration!/a
Hi if u guys love to read interesting stories so check out my site
http://www.elbowfriends.com.
 There are many nice and interesting love stories over there.And if u
guys want to add a new story of ur ownthen u can send ur own created
stories on my site contact tab.

ReferForex is a top in-house Forex affiliate program, offering
affiliates the opportunity to earn commission by referring traders to
our sites, www.finexo.com and www.forexwebtrader.com.
The Forex market is thriving with an estimated daily turnover of 3
trillion U.S. dollars. The earning potential of a Forex affiliate is
tremendous. Join our program and be rewarded for promoting the Forex
market's finest trading platforms.
Our program ensures that affiliates receive highly lucrative
commissions through our various commission structures. We provide our
affiliates every tool necessary for a productive and profitable
partnership.

Become a ReferForex Affiliate today, and join ranks with the program that pays!
!-- Affiliate Code Do NOT Modify--a
href=http://system.referforex.com/processing/clickthrgh.asp?btag=a_5389b_3148;
 target=_blankFall into Foreximg
src=http://system.referforex.com/processing/impressions.asp?btag=a_5389b_3148;
width=0 height=0 border=0/a!-- End affiliate Code--

!-- Affiliate Code Do NOT Modify--a
href=http://system.referforex.com/processing/clickthrgh.asp?btag=a_5389b_3200;
 target=_blankJPost Popunderimg
src=http://system.referforex.com/processing/impressions.asp?btag=a_5389b_3200;
width=0 height=0 border=0/a!-- End affiliate Code--

andAssociates Alerts
New Improved Associates Central
Welcome to the new Associates Central! We've been listening to your
feedback over the last year and we hope you'll find these changes
improve your experience as an Amazon Associates customer and help you
increase your ability to make money through the Amazon Associates
program.
What's new:
Site Stripe: Site Stripe lets you build Associates links directly from
the Amazon.com website so you can update your website more frequently,
with fewer clicks and less time. Next time you go to Amazon.com you
will see the Site Stripe at the top of any Amazon page you visit.
Linking to Amazon.com and Endless.com: Explore a variety of links and
widgets with our new design that helps you discover products to
advertise that will work best for your website and your customers,
including product links and banners.
A new look: Our improved website design makes it easier for you to
navigate through the Associates Central website to find the
information you need with fewer clicks.
Click on the Get Started Tour now, or explore the site on your own!
And as always, we'd love to hear your feedback.


a 
href=http://www.amazon.com/gp/redirect.html?ie=UTF8location=http%3A%2F%2Fwww.amazon.com%2Fcomputer-video-games-hardware-accessories%2Fb%3Fie%3DUTF8%26node%3D468642%26ref%255F%3Dsa%255Fmenu%255Fcvg1tag=elbowfriends-20linkCode=ur2camp=1789creative=390957;Name
Your Link/aimg
src=https://www.assoc-amazon.com/e/ir?t=elbowfriends-20amp;l=ur2amp;o=1;
width=1 height=1 border=0 alt= style=border:none !important;
margin:0px !important; /



On 11/8/08, genius switch [EMAIL PROTECTED] wrote:

 Ok, I was able to debug both items. 1) The flash piece itself is the
 problem, not swfobject. Keep in mind, what you see here is very ugly
 right now since we're just starting dev, the clunky ugly flash piece
 is causing the problem here, and 2) the page jump only happens because
 the page itself is so tall. If I take away the whole bottom content
 and the page no longer creates a scrollbar in the browser 

[jQuery] Converting XML String into DOM on Client via JQuery

2008-11-08 Thread chrisb

Hi There,

I understand that when a server side page returns an xml response with
the headers set appropriately, then JQuery will automatically provide
a DOM representation of the xml so that it can be queried easily,  for
example using something like:

var  node = $('node',xml).

My question is - Is it possible to convert an XML string on the client/
browser into the same type of DOM object so that it can be queried in
the same way?

The reason is, I am working with a cross domain web service which
returns a JSON object but one of the JSON object's properties is an
large XML document which I need to be able to access using xpath style
selectors in the browser.

Thanks, Chris


[jQuery] Problem with the first example!

2008-11-08 Thread John

Hmm, This is starting off very well. I followed the instructions on
the jQuery home page to set up an alert.
My code is as follows:

  html
  head
script type=text/javascript src=jquery_ui.js/script
script type=text/javascript
 $(document).ready(function(){
$(a).click(function(event){
alert(Thanks for visiting!);});
 });
/script
  /head
  body
a href=http://jquery.com/;jQuery/a
  /body
  /html

I just get an error 'Object Expected'

Help! :D


[jQuery] Does the JQuery Ajax and load work properly? It seems to work like an iframe rather than like add html in FF, Opera, Chrome, but works as I would expect in IE

2008-11-08 Thread [EMAIL PROTECTED]

Hi,

Check out the example at

http://docs.jquery.com/Ajax/load#urldatacallback

Click on one of the links in FF 3.0.3 or Chrome and instead of
redirecting the entire window, it just redirects the content within
the ul tags.  However, do it in IE and it redirects the browser window
properly.  To me the ie functionality makes the most sense if we are
just loading in pure html tags.

I am trying to use this in a project but when I load any content that
contains link in ajax, the link only changes the content of the
containing div rather than changing the page.

Is this a bug?  Is there a work around?


[jQuery] Re: Is anyone from London?

2008-11-08 Thread weepy

I live in london

On 8 Nov, 12:38, nmiddleweek [EMAIL PROTECTED] wrote:
 Hello,

 Sorry for the off-topic message but does anyone on the list work or
 live in London?

 I've recently started working for myself and thought it'd be a good
 idea to meet others working with similar tools and in general just
 have a few beers.

 Cheers,
 N


[jQuery] Re: Is anyone from London?

2008-11-08 Thread Jeffrey Kretz

Well I never been to England
But I kinda like the Beatles
Well I headed for Las Vegas
Only made it out to Needles

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of weepy
Sent: Saturday, November 08, 2008 8:45 AM
To: jQuery (English)
Subject: [jQuery] Re: Is anyone from London?


I live in london

On 8 Nov, 12:38, nmiddleweek [EMAIL PROTECTED] wrote:
 Hello,

 Sorry for the off-topic message but does anyone on the list work or
 live in London?

 I've recently started working for myself and thought it'd be a good
 idea to meet others working with similar tools and in general just
 have a few beers.

 Cheers,
 N



[jQuery] Re: jCarousel, localScroll, other options?

2008-11-08 Thread Ariel Flesler

Check LocalScroll's docs. That issue when setting the hash is the
expected behavior.

It's not recommended to combine the option hash when scrolling
something else than the window, or scrolling just in 1 direction.
There's nothing to do about that I think, it's one or the other.

On Sat, Nov 8, 2008 at 12:40 PM, genius switch
[EMAIL PROTECTED] wrote:

 Ok, I was able to debug both items. 1) The flash piece itself is the
 problem, not swfobject. Keep in mind, what you see here is very ugly
 right now since we're just starting dev, the clunky ugly flash piece
 is causing the problem here, and 2) the page jump only happens because
 the page itself is so tall. If I take away the whole bottom content
 and the page no longer creates a scrollbar in the browser window, the
 problem is fixed.

 That said, I'm not quite sure how i'll fix the second issue. I haven't
 had enough coffee yet... perhaps some absolute positioning of the top
 elements, and some top padding of the sections. Hmm... what do you
 think?

 - C

 On Nov 8, 12:25 am, genius switch [EMAIL PROTECTED] wrote:
 I'm almost there, i don't understand why it anchors the page to that
 section though (if you notice it moves the whole page up some). Also,
 a strange little bug in the easing scripting. I'm not sure if i'd call
 it a bug, but a conflict. I am using swfobject to put the flash on the
 page and it makes the easing effect not work. If I remove swfobject it
 works fine.

 http://www.geniusswitchstudio.com/v2/template.htm

 by the way thanks for all your awesome help!

 - C

 On Nov 7, 10:33 pm, Ariel Flesler [EMAIL PROTECTED] wrote:

  Also... whatever you put inside the $( ) should be one or more
  elements containing the links.

  Just in case, try:
  $(function() {
$.localScroll({
  easing:'easeOutQuart'
});

  });

  On Fri, Nov 7, 2008 at 9:29 PM, genius switch

  [EMAIL PROTECTED] wrote:

   I'm doing something wrong of course... man why do I stink at
   javascript?

  script type='text/javascript' src='includes/scripts/
   jquery-1.2.6.min.js'/script
  script type='text/javascript' 
   src='includes/scripts/jquery.easing.
   1.3.js'/script
  script type='text/javascript' 
   src='includes/scripts/jquery.scrollTo-
   min.js'/script
  script type='text/javascript' src='includes/scripts/
   jquery.localscroll-min.js'/script
  script type='text/javascript' src='includes/scripts/init.js'/
   script
  script type=text/javascript
  $(function() {
  $(#content).localScroll({
  easing:'easeOutQuart',
  }
  });
  });
  /script

   On Nov 6, 1:29 pm, Ariel Flesler [EMAIL PROTECTED] wrote:
   You include the easing plugin after jQuery, then when you call 
   LocalScroll:

   $(...).localScroll(
   
   easing:'easeOutQuart',
   

   });

   You can chose any equation, by name.

   On Thu, Nov 6, 2008 at 3:21 PM, genius switch

   [EMAIL PROTECTED] wrote:

Thanks Ariel! I will give that a shot this weekend and let you know
how I do. I know plugging in localScroll will be simple enough, but
I'm not sure about the easing. I'm quite bad at javascript... which is
why I love jquery. Even a simple HTML/CSS developer and web designer
such as myself can get stuff up and running fast :)

- C

On Nov 6, 8:33 am, Ariel Flesler [EMAIL PROTECTED] wrote:
Sure, LocalScroll too. Both allow you to specify an option called
'easing'. You need to add the easing plugin for fancy equations.

Now that I check the demo, I think LocalScroll would fit better. Just
link the buttons and panes by id/href. And it'll do the rest.

--
Ariel Fleslerhttp://flesler.blogspot.com

On Nov 5, 7:27 pm, genius switch [EMAIL PROTECTED] wrote:

 Can that be customized to have the bouncy effect?

 On Nov 5, 8:57 am, Ariel Flesler [EMAIL PROTECTED] wrote:

  Maybe SerialScroll ?

  --
  Ariel Fleslerhttp://flesler.blogspot.com

  On Nov 5, 10:45 am, genius switch [EMAIL PROTECTED] wrote:

   Here is my issue, I have used jCarousel to accomplish what I 
   need...
   however the markup is bothering my anal tendencies for pure
   semantics.

   I'm using jCarousel to scroll content blocks in a sexy way, 
   however,
   in order to use jCarousel I must have my content blocks inside 
   a list,
   each as a list item. This validates, and is functioning 
   exactly how I
   want it to, however I can't get past the fact that this markup 
   doesn't
   make sense.

   LocalScroll is my other option, but it doesn't slide sexy the 
   way
   jCarousel does. Does anyone have any advice?

   Here is the test 
   page:http://www.geniusswitchstudio.com/v2/template.htm

   Thanks!

   - C

   --
   Ariel Fleslerhttp://flesler.blogspot.com

  --
  Ariel 

[jQuery] Re: Ready event is getting fired - each time i click on a link in the page

2008-11-08 Thread Mike Alsup

 My objective is to hide all the images except the first one in the
 table and show them only if i click on the link associated with the
 image. But what is happening is all the images are getting hidden,
 which i donot want.

 Also when i click on the link the image will be displayed for a split
 of a second but disappears because the page is getting loaded and
 hence the ready event is getting called again. Please let me know if
 there is anything wrong with the code.

Two problems:

1.)  Your selector for the first image is wrong.  You have this:

$(img:not(first)).hide();

but it should be this (note the extra colon):

$(img:not(:first)).hide();

You could also do the same thing like this:

$(img:gt(0)).hide();


2.  Your click handlers need to return false to prevent the default
browser behavior (which is to load the linked page).

So your click handlers that look like this:

$(a#tpt).click(function()
{
$(img#firstimg).show();
});

become this:

$(a#tpt).click(function()
{
$(img#firstimg).show();
return false;
});


Mike


[jQuery] sliding left and right effects?

2008-11-08 Thread nmiddleweek

Hi,

I've found the slideUp and slideDown functions but I'm trying to find
a slideLeft and slideRight function. Do they exist at all?


Thanks


[jQuery] how can I wait until blockUI shows

2008-11-08 Thread Gubo

Hi all,

I am very new to jquery, so please excuse my maybe newbie question :)
I have a following problem:
when I call blockUI and execute JS afterwards, the blockUI shows after
the JS finished executing.
When I put alert after calling blockUI, it shows right after alert
pops up. I suppose, that without the alert the IE is too busy
executing JS and therefore does not show the blockUI. The question is,
how can I give blockUI time to show before rest of JS is executed.

thank you in advance

Michael


[jQuery] Plugin/Object

2008-11-08 Thread George

I am learning JQuery and trying to write my own Plug-in.
I have a 'Blinking' plug in. It just makes text blink.

Now I want to be able to stop the blinking (for what ever reason) at
the same time I want to keep the Plug-In styling.

So to make item blink I do

$('#myitem').blink();

Now to stop it I want to be able do something like this

$('#myitem').stopBlinking();

I am not sure how to go about it I've learned the 'event'
technique where I can bind to 'StopBlink' event and then do $
('#myitem').trigger('StopBlink');

But I would like to keep Plug-in type of call so I will be able to do
it like $('#myitem').stopBlinking();


-Here is my blinking plug in
(function($)
{
$.fn.blink = function(options)
{
var opts = $.extend({}, $.fn.blink.defaults, options);
var timer;
return this.each(function()
{
var $this = $(this);
var currentClass = opts.class1;
timer = setInterval(function()
{DoTheBlink($this,opts,currentClass)}, 1000);
});
}

function DoTheBlink($el,opts,currentClass)
{

var newClass = (currentClass == opts.class1) ? opts.class1 :
opts.class2;
$el.toggleClass(newClass);
};

$.fn.blink.defaults = {
class1: 'red',
class2: 'blue'
};

})(jQuery);


How do i add stopBlinking?

Thanks
George.


[jQuery] Re: how can I wait until blockUI shows

2008-11-08 Thread Mike Alsup

 I am very new to jquery, so please excuse my maybe newbie question :)
 I have a following problem:
 when I call blockUI and execute JS afterwards, the blockUI shows after
 the JS finished executing.
 When I put alert after calling blockUI, it shows right after alert
 pops up. I suppose, that without the alert the IE is too busy
 executing JS and therefore does not show the blockUI. The question is,
 how can I give blockUI time to show before rest of JS is executed.


Use a timeout for that.   Something like this:

$.blockUI();
setTimeout(function() {
// do other stuff
...

$.unblockUI();

}, 100);



[jQuery] Re: mcDropDown: any click event fire the drop down animation

2008-11-08 Thread Dan Switzer
I'm not sure why this would be happening, unless something in the UI library
is triggering the document.click for mcDropdown.

-Dan

On Fri, Nov 7, 2008 at 10:22 PM, CED [EMAIL PROTECTED] wrote:


 Some more info:

  including a full version of jquery-ui seems to be required to break
 mcdropdown.

 On Nov 7, 8:49 pm, CED [EMAIL PROTECTED] wrote:
  Dan,
 
  I've narrowed down the problem. I am using a library called jrails
  which includes the javascript below. If i remove it this problem does
  away ( just need to comment out he slideUp  Down definitions to make
  it work). Not sure if its the code below or something in mcDropDown
  thats causing the problem.
 
  (function($) {  $.fn.extend({
  visualEffect : function(o) {
e = o.replace(/\_(.)/g, function(m, l){return l.toUpperCase()});
return eval('$(this).'+e+'()');
  },
  appear : function(speed, callback) {
return this.fadeIn(speed, callback);
  },
  blindDown : function(speed, callback) {
return this.show('blind', { direction: 'vertical' }, speed,
  callback);
  },
  blindUp : function(speed, callback) {
return this.hide('blind', { direction: 'vertical' }, speed,
  callback);
  },
  blindRight : function(speed, callback) {
return this.show('blind', { direction: 'horizontal' }, speed,
  callback);
  },
  blindLeft : function(speed, callback) {
this.hide('blind', { direction: 'horizontal' }, speed,
  callback);
return this;
  },
  dropOut : function(speed, callback) {
return this.hide('drop', {direction: 'down' }, speed,
  callback);
  },
  dropIn : function(speed, callback) {
return this.show('drop', { direction: 'up' }, speed, callback);
  },
  fade : function(speed, callback) {
return this.fadeOut(speed, callback);
  },
  fadeToggle : function(speed, callback) {
return this.animate({opacity: 'toggle'}, speed, callback);
  },
  fold : function(speed, callback) {
return this.hide('fold', {}, speed, callback);
  },
  foldOut : function(speed, callback) {
return this.show('fold', {}, speed, callback);
  },
  grow : function(speed, callback) {
return this.show('scale', {}, speed, callback);
  },
  highlight : function(speed, callback) {
return this.show('highlight', {}, speed, callback);
  },
  puff : function(speed, callback) {
return this.hide('puff', {}, speed, callback);
  },
  pulsate : function(speed, callback) {
return this.show('pulsate', {}, speed, callback);
  },
  shake : function(speed, callback) {
return this.show('shake', {}, speed, callback);
  },
  shrink : function(speed, callback) {
return this.hide('scale', {}, speed, callback);
  },
  squish : function(speed, callback) {
return this.hide('scale', { origin: ['top', 'left'] }, speed,
  callback);
  },
  slideUp : function(speed, callback) {
return this.hide('slide', { direction: 'up'}, speed, callback);
  },
  slideDown : function(speed, callback) {
return this.show('slide', { direction: 'up'}, speed, callback);
  },
  switchOff : function(speed, callback) {
return this.hide('clip', {}, speed, callback);
  },
  switchOn : function(speed, callback) {
return this.show('clip', {}, speed, callback);
  }
});
 
  })(jQuery);
 
  On Oct 22, 1:58 pm, Dan Switzer [EMAIL PROTECTED] wrote:
 
The example page works as it should, I am using the the latest
listed:  * Rev:  1.2.07
 
I had the same behavior on 2 different pages. Unfortunately there is
not live example. Everything else works fine with the widget.
 
The root menu  actually animates on the top left of the page at first
when any click happens. After the mcdropdown is first clicked it
animates the selct box with an open and close.
 
   I've never seen this behavior and without some more detail or you
 posting a
   live working example somewhere that I can observe the behavior, it's
 hard
   for me to give you much help. There's only one global click handler,
 which
   is designed to close the menu if it's in an open state and you haven't
   clicked on the menu. You might try looking at adding some debugging to
 that
   code (starts on line 94) to see if you can help determine what the
 cause is.
 
   -Dan



[jQuery] Re: Tablesorter advice required - row level filtering based on inputs?

2008-11-08 Thread Hector Virgen
I actually just started writing a plugin to do exactly what you need. I
chose to keep it separate so that they can be used independently. Also, the
search plugin is designed to work with any group of data, not just tables.
It also works on things like unordered lists or a collection of divs.
I'll send you a link to it when it's done.

-Hector


On Fri, Nov 7, 2008 at 7:31 PM, rich [EMAIL PROTECTED] wrote:


 Hello.
 I'm here for advice on which approach to take with this problem.

 I am using the wonderful tablesorter 2 plugin (http://
 tablesorter.com/).

 I have a table that contains data. I'd like to provide an input field
 above the table so that a user can filter rows based on a string
 matched from one particular column.

 Is this something I could implement as an add-on to tablesorter or am
 I better off keeping this functionality altogether separate.

 Hope that makes sense.

 Thanks for reading
 Richard



[jQuery] Re: animated robot cartoon with jquery

2008-11-08 Thread CodingCyborg

I was actually pleased to find that there is a jQuery plug-in for
playing sounds! Now if I could only get these darn timeouts to clear
properly!


On Nov 8, 12:07 am, Jeffrey Kretz [EMAIL PROTECTED] wrote:
 It's actually workable to use Flash as a basis for the sound.  It's easier
 with ActionScript 3.0, but it can still be done in earlier versions.  You
 have to bind a flash method to an external interface (look up
 ExternalInterface in the docs).

 Then you can find the object by ID, and call the method on it directly.

 $('#swffile')[0].playSound();

 JK

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

 Behalf Of CodingCyborg
 Sent: Friday, November 07, 2008 9:04 PM
 To: jQuery (English)
 Subject: [jQuery] Re: animated robot cartoon with jquery

 I am sad to report that finding cross browser audio playing javascript
 is pretty tough stuff... I found one plug-in that used flash, but
 couldn't get it implemented correctly. I may try again tomorrow, but
 don't count on it too much, if somebody else could implement some
 squeaky wheel sounds for when it's moving that would be nice :) Best
 of luck.

 On Nov 7, 10:12 pm, CodingCyborg [EMAIL PROTECTED] wrote:
  I found the edge of the cliff while allowing the robot to roll
  multiple times without resetting the backgrounds. From there I thought
  it would be fun to have him fall :) Now I'm looking into adding some
  fun sound effects :) I'll let ya know how that goes in a couple
  hours...

  On Nov 7, 8:58 pm, anthony.calzadilla [EMAIL PROTECTED]
  wrote:

   Thats incredible! How did you do that?! I'm going to dig into your
   code and try to figure it out... AWESOME!

   -A

   On Nov 7, 8:50 pm, CodingCyborg [EMAIL PROTECTED] wrote:

Well, I decided to add some more fun stuff :)

   http://codingcyborg.com/jQueryFun/Robot/robotHumor.html

There are now some movement images on the wheels. And I added an old
school off the cliff cartoon style ending :)

On Nov 7, 11:58 am, anthony.calzadilla

[EMAIL PROTECTED] wrote:
 Hi,
 I changed the 'bounceHim' function a bit so that the different
 pieces
 of the robot look like they are separated and bouncing individually:

 function bounceHim(){
         $(#sec-content,#branding).animate({top:-=5px},
 150).animate({top:+=5px},150);
                
 $(#content).animate({top:-=8px},150).animate({top:+=8px},150);
         setTimeout(bounceHim(),300);

 }

http://robot.anthonycalzadilla.com/

 Once again thanks for your insight. I really am a complete novice at
 programming in general. I'm really scrutinizing your code so as to
 learn from it.

 -Anthony

 On Nov 7, 8:34 am, CodingCyborg [EMAIL PROTECTED] wrote:

  I just noticed, after looking over the code again, that since you
 have
  all three pieces of the robot that are bouncing bounce at the same
  time the line of code can be condensed into one. As well as the
 two
  that bounce together at the beginning.
  This:

         
 $(#content).animate({top:-=+num+px},150).animate({top:+=+num
  +px},150);
         
 $(#branding).animate({top:-=+num+px},150).animate({top:+=+num
  +px},150);

  Becomes this:

          $(#content,#branding).animate({top:-=+num+px},
  150).animate({top:+=+num+px},150);

  And in the next function this:

         
 $(#sec-content).animate({top:-=5px},150).animate({top:+=5px},
  150);
         
 $(#content).animate({top:-=5px},150).animate({top:+=5px},150);
         
 $(#branding).animate({top:-=5px},150).animate({top:+=5px},150);

  Becomes this:

         
 $(#sec-content,#content,#branding).animate({top:-=5px},
  150).animate({top:+=5px},150);

  Of course, if you wished to have each part bounce a different
 amount
  or at different rates you would need to set up different
 timeouts
  with different functions if they couldn't be set with the current
 300
  ms function. But if you wanted something to go at half speed or a
  whole number multiple speed you could just changed how much code
 was
  in the function and the numbers associated with it. (If any of
 that
  makes sense.)

  But that saves more code, and again, makes the file a bit (Quite
  seriously only  a few bits :P) smaller.

  On Nov 7, 12:44 am, anthony.calzadilla

  [EMAIL PROTECTED] wrote:
   Wow! Thank you CodingCyborg! Thank You! I'm going to study and
 learn
   from your code example and implement it into mine.

   -Anthony

   On Nov 7, 12:24 am, CodingCyborg [EMAIL PROTECTED] wrote:

I made a few more modifications such that the robot doesn't
 keep
bouncing and the sky keep moving when the ground has stopped.
 Though I
did the cheap way, in the sense that I just made it a short
 clip
rather than a full length repeat.

   http://codingcyborg.com/jQueryFun/Robot/robot.html

   

[jQuery] Re: How to load only one image at a time using JQuery Cycle Plugin?

2008-11-08 Thread OutOfTouch

I just noticed that I still need to hide everything and return false
when the Please Select a Value is chosen in the dropdown.
The bug I am seeing in FF though is going back and forth between two
real values where I get real images loaded.

JavaScript:

var length;
var mailPieceGroups;
var slidesAdded = false;
var myFancySelector = '#' + myControlId; --- This is something
special I have to do because ASP.Net renames control id's with a
unique name under certain circumstances. Anyways myControlId is the if
of my dropdown and is defined in a script block in the head section of
my page.

$(document).ready(function() {

$('#nav').hide();
$('#output').hide();

//$('#ddlAdFundSelection').change(function(){

$(myFancySelector).change(function(){

var selectedValue;
var myDataToSend;

url: ../MyStaticPage.aspx/GetMailPieceGroupsByAdFundTypeId,
selectedValue = $(myFancySelector).val();
//TODO: If selectedVal = NA then hide stuff and return false.
myDataToSend = {'adFundTypeId':' +  selectedValue + '}
$.ajax({
 type: POST,
url: ../Orders/Orders.aspx/
GetMailPieceGroupsByAdFundTypeId,
data: myDataToSend,
contentType: application/json; charset=utf-8,
  dataType: json,
 //error: function(XMLHttpRequest, textStatus,
errorThrown) {alert(textStatus);alert(errorThrown); this;},
  success: function(data, textStatus){mailPieceGroups = eval('('
+ data + ')'); startSlideShow(mailPieceGroups); }
});

function startSlideShow(mailPieceGroups)
{
var html = '';
var $slideshow = $('#slideshow').cycle('stop').empty();
length = mailPieceGroups.length;
for (i = 0; i  length; i++)
{
  //alert(mailPieceGroups[i].FileName);
  html = 'a href=' +
mailPieceGroups[i].OrderFormUrl + ' id=orderFormUrl' + i +
'img src=../Images/'+ mailPieceGroups[i].FileName + '
id=mailPieceImg' + i +
' width=345 height=245 //a';

$slideshow.append(html);
}

$('#nav').show();

$('#slideshow').cycle({
 fx: 'fade',
speed:  'slow',
timeout: 0,
  next:   '#next',
prev:   '#prev' ,
 startingSlide: 0,
after: onAfter
});

function onAfter()
{
   var index = $(this).parent().children().index(this);
   $('#output').show();
  //alert(index);
   $('#description').text(mailPieceGroups[index].Description);
  $('#priceInfo').text(mailPieceGroups[index].PriceDescription);
};

 }; // End StartSlideShow

//alert(myDataToSend);

}); // End Changed Function

});

If I post it all it will just add to the confusion so here is the
relevant html.
HTML:

p class=teaser style=text-align:center;
strong
Click on the image for the mail piece group you want
to order.nbsp;
/strong
/p
div id=nav class=nav
a id=prev href=#Prev/a
a id=next href=#Next/a
/div
div id=slideshow class=pics
/div
br /
br /
div id=output
p id=descriptionDescription Goes Here/p
p id=priceInfoPrice Goes Here/p
p(SomeMoreText Here)/p
/div


Thanks for your help.


[jQuery] Re: how can I wait until blockUI shows

2008-11-08 Thread Gubo

Hello Mike,

it worked. thank you very much.

Michael

On Nov 8, 7:30 pm, Mike Alsup [EMAIL PROTECTED] wrote:
  I am very new to jquery, so please excuse my maybe newbie question :)
  I have a following problem:
  when I call blockUI and execute JS afterwards, the blockUI shows after
  the JS finished executing.
  When I put alert after calling blockUI, it shows right after alert
  pops up. I suppose, that without the alert the IE is too busy
  executing JS and therefore does not show the blockUI. The question is,
  how can I give blockUI time to show before rest of JS is executed.

 Use a timeout for that.   Something like this:

 $.blockUI();
 setTimeout(function() {
     // do other stuff
     ...

     $.unblockUI();

 }, 100);


[jQuery] Re: animated robot cartoon with jquery

2008-11-08 Thread CodingCyborg

http://codingcyborg.com/jQueryFun/Robot/robotSound.html

Not the best sound file, it's actually a couch sound, but I couldn't
find anything better in the time I had. The timeouts weren't clearing
properly for awhile. When I switched the order they worked better, but
they didn't all clear at the same time like they should have. This one
is a bit rough around the edges, but the sound is a nice addition :)

On Nov 8, 1:46 pm, CodingCyborg [EMAIL PROTECTED] wrote:
 I was actually pleased to find that there is a jQuery plug-in for
 playing sounds! Now if I could only get these darn timeouts to clear
 properly!

 On Nov 8, 12:07 am, Jeffrey Kretz [EMAIL PROTECTED] wrote:

  It's actually workable to use Flash as a basis for the sound.  It's easier
  with ActionScript 3.0, but it can still be done in earlier versions.  You
  have to bind a flash method to an external interface (look up
  ExternalInterface in the docs).

  Then you can find the object by ID, and call the method on it directly.

  $('#swffile')[0].playSound();

  JK

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

  Behalf Of CodingCyborg
  Sent: Friday, November 07, 2008 9:04 PM
  To: jQuery (English)
  Subject: [jQuery] Re: animated robot cartoon with jquery

  I am sad to report that finding cross browser audio playing javascript
  is pretty tough stuff... I found one plug-in that used flash, but
  couldn't get it implemented correctly. I may try again tomorrow, but
  don't count on it too much, if somebody else could implement some
  squeaky wheel sounds for when it's moving that would be nice :) Best
  of luck.

  On Nov 7, 10:12 pm, CodingCyborg [EMAIL PROTECTED] wrote:
   I found the edge of the cliff while allowing the robot to roll
   multiple times without resetting the backgrounds. From there I thought
   it would be fun to have him fall :) Now I'm looking into adding some
   fun sound effects :) I'll let ya know how that goes in a couple
   hours...

   On Nov 7, 8:58 pm, anthony.calzadilla [EMAIL PROTECTED]
   wrote:

Thats incredible! How did you do that?! I'm going to dig into your
code and try to figure it out... AWESOME!

-A

On Nov 7, 8:50 pm, CodingCyborg [EMAIL PROTECTED] wrote:

 Well, I decided to add some more fun stuff :)

http://codingcyborg.com/jQueryFun/Robot/robotHumor.html

 There are now some movement images on the wheels. And I added an old
 school off the cliff cartoon style ending :)

 On Nov 7, 11:58 am, anthony.calzadilla

 [EMAIL PROTECTED] wrote:
  Hi,
  I changed the 'bounceHim' function a bit so that the different
  pieces
  of the robot look like they are separated and bouncing individually:

  function bounceHim(){
          $(#sec-content,#branding).animate({top:-=5px},
  150).animate({top:+=5px},150);
                 
  $(#content).animate({top:-=8px},150).animate({top:+=8px},150);
          setTimeout(bounceHim(),300);

  }

 http://robot.anthonycalzadilla.com/

  Once again thanks for your insight. I really am a complete novice at
  programming in general. I'm really scrutinizing your code so as to
  learn from it.

  -Anthony

  On Nov 7, 8:34 am, CodingCyborg [EMAIL PROTECTED] wrote:

   I just noticed, after looking over the code again, that since you
  have
   all three pieces of the robot that are bouncing bounce at the same
   time the line of code can be condensed into one. As well as the
  two
   that bounce together at the beginning.
   This:

          
  $(#content).animate({top:-=+num+px},150).animate({top:+=+num
   +px},150);
          
  $(#branding).animate({top:-=+num+px},150).animate({top:+=+num
   +px},150);

   Becomes this:

           $(#content,#branding).animate({top:-=+num+px},
   150).animate({top:+=+num+px},150);

   And in the next function this:

          
  $(#sec-content).animate({top:-=5px},150).animate({top:+=5px},
   150);
          
  $(#content).animate({top:-=5px},150).animate({top:+=5px},150);
          
  $(#branding).animate({top:-=5px},150).animate({top:+=5px},150);

   Becomes this:

          
  $(#sec-content,#content,#branding).animate({top:-=5px},
   150).animate({top:+=5px},150);

   Of course, if you wished to have each part bounce a different
  amount
   or at different rates you would need to set up different
  timeouts
   with different functions if they couldn't be set with the current
  300
   ms function. But if you wanted something to go at half speed or a
   whole number multiple speed you could just changed how much code
  was
   in the function and the numbers associated with it. (If any of
  that
   makes sense.)

   But that saves more code, and again, makes the file a bit (Quite
   seriously only  a few bits :P) smaller.

   On Nov 7, 12:44 am, anthony.calzadilla

   [EMAIL 

[jQuery] Poll sumbit

2008-11-08 Thread [EMAIL PROTECTED]

Hi all,

I want to build something so that when someone submits his poll choise
that the poll will change into the results without any refresh. Whats
the best way to start of with for building this?

So:
- user visite the site
- user chooses a option on the poll
- he presses on vote
- then his answer will be added to the database
- poll results will show

When a person already voted he also has to show the results.

Whats the best way to start of with?

Erwin


[jQuery] Re: Poll sumbit

2008-11-08 Thread CodingCyborg

I'm not sure if this is the only way, and I'm not actually sure of how
to do it, but for a registration page I have for a game they use
functions that reference PHP pages that interact with the database and
return information such that the page doesn't have to reload in order
for database interaction to take place. This would allow for entering
the vote and then showing the new data.

On Nov 8, 2:34 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Hi all,

 I want to build something so that when someone submits his poll choise
 that the poll will change into the results without any refresh. Whats
 the best way to start of with for building this?

 So:
 - user visite the site
 - user chooses a option on the poll
 - he presses on vote
 - then his answer will be added to the database
 - poll results will show

 When a person already voted he also has to show the results.

 Whats the best way to start of with?

 Erwin


[jQuery] Jquery Countdown!!!

2008-11-08 Thread B3

Can someone just give me some instructions to get this to work??? I
don't understand how to implement this into my site...  where would I
put this:

$('#listLayout').countdown({until: liftoffTime, format: 'yODHMS',
layout: 'ul%Yli%n %l/li%Y%Oli%n %l/li%O%Dli%n %l/li
%D' +
'%Hli%n %l/li%H%Mli%n %l/li%M%Sli%n %l/li%S/ul'});

??? The countdown.js and jquery.js are loading but I don't get it...
and also what would I put in the html side? I got this from here
http://keith-wood.name/countdown.html#listLayout

thanks


[jQuery] Simple Filtering Script not working

2008-11-08 Thread Nic Hubbard

I am working on a simple filtering script that will match the jquery
selector, and find the text inside all the child nodes.  Then hide
those that are not found.

For some reason it is not working, and I am not sure why.  Is there a
better way I could be doing this?

var obj = $(this);

$('#filter').keyup(function() {
var filter = $('#filter').val();
obj.each(function() {
if ($(this + ':contains(filter)')) {
$(this).show();
} else {
$(this).hide();
};
});
});



[jQuery] Re: Poll sumbit

2008-11-08 Thread FrenchiINLA

I would do it this way,
- on Page Load get the result from db and display it
- user selection --- update db -- return the updated result --
display it

On Nov 8, 12:34 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Hi all,

 I want to build something so that when someone submits his poll choise
 that the poll will change into the results without any refresh. Whats
 the best way to start of with for building this?

 So:
 - user visite the site
 - user chooses a option on the poll
 - he presses on vote
 - then his answer will be added to the database
 - poll results will show

 When a person already voted he also has to show the results.

 Whats the best way to start of with?

 Erwin


[jQuery] How to correctly set a dblclick(..) on a dynamically added table row ?

2008-11-08 Thread Paul Hammant

Below is a demo of the problem i have. Reduced to the minimal HTML I  
think.

I start with a row in a table, but on load, I remove it and store it.   
Then i dynamically insert some row based on a clone of the original.   
As I add each row i add a double-click to a popup form (via blockUI).
The first time you double click a row it works.  The second time  
everything freezes during the popup.

There must be some rules around row removal and re-adding, or  
dynamically attaching a dblclick(..) event that I'm unaware of.

What am I missing ?

- Paul

--

html
titlejQuery bug demo?/title
script type=text/javascript src=jquery-1.2.6.pack.js/script
script type=text/javascript src=jquery.blockUI.min.js/script
script

 $(document).ready(function() {
 // take row from table, for futire use.
 rowToClone = $('#mytable tr:last').remove();
 insertRow(1, double-click this line first);
 insertRow(2, then double-click this line);
 $(#cancelRead).click(function() {
 document.readMyForm.reset();
 $.unblockUI();
 });
 });

 function doubleClick() {
 var readRow = $('#readRow');
 $.blockUI(readRow, {width:'540px', height:'300px'});
 }

 function insertRow(id, foo) {
 var newRow = rowToClone.clone();
 newRow.attr(id, id);
 $('td[class*=class1]', newRow).html(foo);
 newRow.dblclick(doubleClick);   // Is this an OK thing to  
do 
 $('#mytable').append(newRow);
 }

/script
body

table id=mytable cellpadding=0 cellspacing=0
 tbody
 tr class=myRow id=1
 td class=class1PLACEHOLDER/td
 /tr
 /tbody
/table

div id=readRow style=display:none;cursor:default;

 h2Hello!/h2

 form id=readMyForm name=readMyForm
 input type=button id=cancelRead value=Close
 /form
/div

/body
/html


[jQuery] Re: Jquery Countdown!!!

2008-11-08 Thread FrenchiINLA

Add the following in the header of your page with the correct
liftoffTime value
script type=text/javascript
$(function() {
var liftoffTime = new Date();
liftoffTime.setDate(liftoffTime.getDate() + 5);
$('#listLayout').countdown({ until: liftoffTime, format:
'yODHMS',
layout: 'ul%Yli%n %l/li%Y%Oli%n %l/li%O%Dli
%n %l/li%D' +
'%Hli%n %l/li%H%Mli%n %l/li%M%Sli%n %l/li%S/ul'
});
});
/script

Then in your page body add a span like span id=listLayout/span
and your code should work

On Nov 8, 3:30 pm, B3 [EMAIL PROTECTED] wrote:
 Can someone just give me some instructions to get this to work??? I
 don't understand how to implement this into my site...  where would I
 put this:

 $('#listLayout').countdown({until: liftoffTime, format: 'yODHMS',
     layout: 'ul%Yli%n %l/li%Y%Oli%n %l/li%O%Dli%n %l/li
 %D' +
     '%Hli%n %l/li%H%Mli%n %l/li%M%Sli%n %l/li%S/ul'});

 ??? The countdown.js and jquery.js are loading but I don't get it...
 and also what would I put in the html side? I got this from 
 herehttp://keith-wood.name/countdown.html#listLayout

 thanks


[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: combining slideup, post, slidedown

2008-11-08 Thread Karl Swedberg
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 Swedberg
www.englishrules.com
www.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] beginner help jquery.load

2008-11-08 Thread bumblebean

HI. I'm really new to jquery, and PHP for that matter. I'm trying to
complete a school assignment, and I'm s stuck. What I'm trying to
do is submit form data through jquery to a php page. The php works as
intended when called outside of jquery. It basically takes some POST
values, and writes them to a database. It's then supposed to return a
string which lets a user know the result of the attempt. All I want to
do is load the resulting string into a div on my form page.

However, in the way I'm calling it from Jquery, I'm doing something
wrong, since all I'm getting back in my alert message is a huge pop up
with the entire contents of the PHP page. It's never actually
processing. Here's my jquery call (the one letter variables are
derived from my validation script. These also hold the correct
values):

***
 $.post(bin/uploadstory.php,
   {heading: h, story: s, urllink: u, image: p, category: c},
   function(data){
   alert(Data Loaded:  + data);
});
***

and here's my php page, bin/uploadstory.php (this is the full code on
this page).

***

?php
include(dbconnect.php); //db connection script
include(dbstories.php); // script which writes story to database,
using a writestory() function

echo(getResult());

function getResult(){

$msg = ;

if(connectDB()){

$user = $_SESSION('userid');
$heading = $_POST('heading');
$story  = $_POST('story');
$urllink  = $_POST('urllink');
$image = $_POST('photo');
$category = $_POST('category');

$result = writeStory($user, $heading, $story, $urllink, $image,
$category);
if($result==0)
$msg =couldn't create record;
else if($result==1)
$msg =record created, couldn't add category;
else if ($result==2)
$msg = article added successfully;
else $msg = unknown error occured. please try again.;
return $msg;
}
else $msg = Couldn't connect to the database. Please try again
later.;
return $msg;
}

*

Can anyone help me out? I've been stuck on this little part for 3
days, and i know it's something stupid, but i can't figure out what.


[jQuery] beginner help jquery.load

2008-11-08 Thread bumblebean

HI. I'm really new to jquery, and PHP for that matter. I'm trying to
complete a school assignment, and I'm s stuck. What I'm trying to
do is submit form data through jquery to a php page. The php works as
intended when called outside of jquery. It basically takes some POST
values, and writes them to a database. It's then supposed to return a
string which lets a user know the result of the attempt. All I want to
do is load the resulting string into a div on my form page.

However, in the way I'm calling it from Jquery, I'm doing something
wrong, since all I'm getting back in my alert message is a huge pop up
with the entire contents of the PHP page. It's never actually
processing. Here's my jquery call (the one letter variables are
derived from my validation script. These also hold the correct
values):

***
 $.post(bin/uploadstory.php,
   {heading: h, story: s, urllink: u, image: p, category: c},
   function(data){
   alert(Data Loaded:  + data);
});
***

and here's my php page, bin/uploadstory.php (this is the full code on
this page).

***

?php
include(dbconnect.php); //db connection script
include(dbstories.php); // script which writes story to database,
using a writestory() function

echo(getResult());

function getResult(){

$msg = ;

if(connectDB()){

$user = $_SESSION('userid');
$heading = $_POST('heading');
$story  = $_POST('story');
$urllink  = $_POST('urllink');
$image = $_POST('photo');
$category = $_POST('category');

$result = writeStory($user, $heading, $story, $urllink, $image,
$category);
if($result==0)
$msg =couldn't create record;
else if($result==1)
$msg =record created, couldn't add category;
else if ($result==2)
$msg = article added successfully;
else $msg = unknown error occured. please try again.;
return $msg;
}
else $msg = Couldn't connect to the database. Please try again
later.;
return $msg;
}

*

Can anyone help me out? I've been stuck on this little part for 3
days, and i know it's something stupid, but i can't figure out what.


[jQuery] Re: Jquery Countdown!!!

2008-11-08 Thread B3

I did exactly what you said, added the top to my head and added the
span to the html and still nothing.  Seems the files are being loaded,
so I don't understand whats going on.. anythin else I can try?

On Nov 8, 4:49 pm, FrenchiINLA [EMAIL PROTECTED] wrote:
 Add the following in the header of your page with the correct
 liftoffTime value
     script type=text/javascript
         $(function() {
             var liftoffTime = new Date();
             liftoffTime.setDate(liftoffTime.getDate() + 5);
             $('#listLayout').countdown({ until: liftoffTime, format:
 'yODHMS',
                 layout: 'ul%Yli%n %l/li%Y%Oli%n %l/li%O%Dli
 %n %l/li%D' +
     '%Hli%n %l/li%H%Mli%n %l/li%M%Sli%n %l/li%S/ul'
             });
         });
     /script

 Then in your page body add a span like span id=listLayout/span
 and your code should work

 On Nov 8, 3:30 pm, B3 [EMAIL PROTECTED] wrote:

  Can someone just give me some instructions to get this to work??? I
  don't understand how to implement this into my site...  where would I
  put this:

  $('#listLayout').countdown({until: liftoffTime, format: 'yODHMS',
      layout: 'ul%Yli%n %l/li%Y%Oli%n %l/li%O%Dli%n %l/li
  %D' +
      '%Hli%n %l/li%H%Mli%n %l/li%M%Sli%n %l/li%S/ul'});

  ??? The countdown.js and jquery.js are loading but I don't get it...
  and also what would I put in the html side? I got this from 
  herehttp://keith-wood.name/countdown.html#listLayout

  thanks