jquery question on slideUp fadeIn and show

K

Kevin Lucas

Hi all,

jquery noob question here. I've got a php script that runs a few price
checker kiosks out on the sales floor at work and I've got a <p> element
that I can get to slide up when a product is scanned and slide back down
after a 5 second pause with:

$(function() {
$("p").slideUp("slow");
setTimeout(function(){ $("p").slideDown("slow"); }, 5000);
});

but when I change the slideUp and slideDown to fadeIn and fadeOut I'm not
getting the element to fade in or out. Instead the element shows up on the
screen then after 5 seconds the element appears in the position where it
ends up after a slideUp.

Similarly if I change the slideUp and slideDown to 'show' and 'hide' the
element again shows up in the spot that it starts the slideUp from then
slides up after 5 seconds.

Any thoughts on what I'm doing wrong?

Thanks in advance.

P.S. would've posted this in a jquery newgroup but couldn't find one carried
on my news server. :\

kev.
 
K

Kevin Lucas

K

Kevin Lucas

Thomas said:
Kevin said:
JR said:
On Sep 13, 6:38 pm, Kevin Lucas

jquery noob question here. [...]
OMG... The anti-jQuery crusaders are bringing the axe...

Gulp, oh boy. That bad huh?

Yes, jQuery is that bad. If you take a moment to look beyond $() calls,
you might notice it.


PointedEars

Yes, the original question is a moot point as the embedded browser that the
price checkers use don't support it. Should've been suspicious when it
didn't work in Konqueror ;).

kev.
 
D

David Mark

Thomas said:
Kevin said:
JR wrote:
On Sep 13, 6:38 pm, Kevin Lucas
jquery noob question here. [...]
OMG... The anti-jQuery crusaders are bringing the axe...
Gulp, oh boy.  That bad huh?
Yes, jQuery is that bad.  If you take a moment to look beyond $() calls,
you might notice it.
PointedEars

Yes, the original question is a moot point as the embedded browser that the
price checkers use don't support it.  Should've been suspicious when it
didn't work in Konqueror ;).

Ah, another triumph. :) The clock is running out on that script for
sure.
 
S

S.T.

David said:
On Sep 14, 9:57 am, Kevin Lucas

Ah, another triumph. :) The clock is running out on that script for
sure.

.... or, more likely, Konqueror's time is running out. Aside from JQuery
(and presumably most JS libraries) substantial Google and Yahoo
properties don't bother to support KJS -- the Gmail UI, Yahoo! Mail,
Google Calendar and Reader, etc.
 
D

David Mark

... or, more likely, Konqueror's time is running out. Aside from JQuery
(and presumably most JS libraries) substantial Google and Yahoo
properties don't bother to support KJS -- the Gmail UI, Yahoo! Mail,
Google Calendar and Reader, etc.

Lets assume there is no Konquerer. That leaves n - 1 browsers to
support. Throw out whatever is embedded in his price checker and you
get n - 2. How many do jQuery (or GMail or whatever) do well? The
point is that these failings are symptoms and likely to get worse with
each browser produced. Dismissing them in turn is wishful thinking.

The current failings of other sites, whatever script(s) they may use,
don't enter into it.
 
R

RobG

... or, more likely, Konqueror's time is running out. Aside from JQuery
(and presumably most JS libraries) substantial Google and Yahoo
properties don't bother to support KJS


If that logic had any merit, the only browser anyone would "bother to
support" would be IE 6.
 
S

S.T.

David said:
Lets assume there is no Konquerer. That leaves n - 1 browsers to
support. Throw out whatever is embedded in his price checker and you
get n - 2. How many do jQuery (or GMail or whatever) do well?

You seem concerned about how many browsers a site supports. That may be
a reasonable goal for a public service site to ask -- though
whitehouse.gov uses (and old version of) JQuery, so perhaps not. However
it's not the concern for most commercial entities.

Commercial sites are concerned about... well.. commercial interests.
They care about user reach, not browser reach. Yahoo probably spells it
out best:
http://www.yuiblog.com/blog/2009/07/02/gbs-update-20090702/
The
point is that these failings are symptoms and likely to get worse with
each browser produced. Dismissing them in turn is wishful thinking.

The current failings of other sites, whatever script(s) they may use,
don't enter into it.

Surfing traffic doesn't consider the sites as having failings. If a site
doesn't work on one browser but does on another - it's the browser's
fault. They'll switch soon enough.

The market penetration of JQuery alone is huge:
http://trends.builtwith.com/javascript/JQuery

Tie in various Google and Yahoo properties, along with all the others
that use a similar design, development and testing criteria, and a huge
chunk of the sites out there have set the standard for browsers to
follow. A new browser is welcome to join the mix but if it's user base
finds it has to use an old, awkward Yahoo Mail UI, ESPN and Amazon don't
work as expected cause of JQuery and Google Reader won't function at all
-- it's not going to have much of a user base anyways.

Like it or not, content now controls standards.
 
D

David Mark

You seem concerned about how many browsers a site supports.

A valid concern.
That may be
a reasonable goal for a public service site to ask -- though
whitehouse.gov uses (and old version of) JQuery, so perhaps not.

So what does that prove?
However
it's not the concern for most commercial entities.

Their concern is typically collecting money from as many people as
possible.
Commercial sites are concerned about... well.. commercial interests.
Unsurprisingly.

They care about user reach, not browser reach.

Your momentum just gave out. What do users use?

I doubt it.
 > The



Surfing traffic doesn't consider the sites as having failings.

Failings are what they are. As for traffic, everything's relative.
Just because a popular site makes mistakes doesn't mean you should try
to replicate them.
If a site
doesn't work on one browser but does on another - it's the browser's
fault. They'll switch soon enough.

Who will switch what?
The market penetration of JQuery alone is huge:http://trends.builtwith.com/javascript/JQuery

So what?
Tie in various Google and Yahoo properties, along with all the others
that use a similar design, development and testing criteria, and a huge
chunk of the sites out there have set the standard for browsers to
follow.

I have no idea what you are talking about (and assume you are
similarly affected). :)
A new browser is welcome to join the mix but if it's user base
finds it has to use an old, awkward Yahoo Mail UI, ESPN and Amazon don't
work as expected cause of JQuery and Google Reader won't function at all
-- it's not going to have much of a user base anyways.

Like it or not, content now controls standards.

But that's not how things work. Browser developers don't bend for
dubious blobs of Javascript (they usually break them on purpose). And
what standards are you talking about, anyway?
 
R

RobG

David Mark wrote: [...]
Commercial sites are concerned about... well.. commercial interests.
They care about user reach, not browser reach. Yahoo probably spells it
out best:http://www.yuiblog.com/blog/2009/07/02/gbs-update-20090702/

Yahoo! is not a paragon of browser development. Last I saw, their
marketshare was slipping so badly they had to do a deal with MS to
survive. Whatever they are doing now, it's not working for them as
well as what they were doing before.

Maybe if they'd switched to jQuery they'd be back on top of Google.

 > The



Surfing traffic doesn't consider the sites as having failings. If a site
doesn't work on one browser but does on another - it's the browser's
fault. They'll switch soon enough.

Yes, they'll switch sites very quickly and if it works better for
them, that's where they'll stay.

The market penetration of JQuery alone is huge:http://trends.builtwith.com/javascript/JQuery

Read the history of the rise and fall if IE 6. Maybe all browsers
should just have emulated it and forgotten about innovation. Maybe all
those Linux and Apple freaks should just ditch their niche machines
and the whole world should run Windows. While we're at it, lets kill
anything other than Vista or Win7, who cares about anyone who can't
afford the latest and greatest PC and OS?

What was the WWW all about anyway? Glad we got rid of those bleeding
heart lefties...

[...]
Like it or not, content now controls standards.

If content is king, development tools should aim to maximise access.
Selecting tools that deliberately marginalise a measurable number of
potential consumers is inconsistent with that logic.
 
D

David Mark

s/possible/practical/

See also: The law of diminishing returns.

And your deal is that any excuse is valid. Sure, use an obviously
wacky (and widely misunderstood) 50K blob of script on your e-commerce
site. Why not? Not practical, otherwise. Matt Kruse said so. Of
course, he doesn't know anyone who has an iPhone either. ;)
 
M

Matt Kruse

s/possible/practical/
See also: The law of diminishing returns.
And your deal is that any excuse is valid.  [...]

Nah, I just get tired of hearing the argument that the goal of web
sites (especially those attempting to make a profit) is surely to get
sales from every possible potential customer, and that is their only
goal bar none. It's just a dumb argument.

There is a cost associated with targetting any slice of the market. If
you can target and support the vast majority of potential customers
for low cost, that makes economic sense. If the cost to target and
support the additional 3% or whatever is significantly higher, then
that may not be worth it.

Argue the cost/benefit specifics all you want, or the pros and cons of
different approaches, but resorting to the argument that 100% support
for all users is always (or should always be) the goal is ridiculous
for most people. IMO.

Matt Kruse
 
D

David Mark

However
it's not the concern for most commercial entities.
Their concern is typically collecting money from as many people as
possible.
s/possible/practical/
See also: The law of diminishing returns.
And your deal is that any excuse is valid.  [...]

Nah, I just get tired of hearing the argument that the goal of web
sites (especially those attempting to make a profit) is surely to get
sales from every possible potential customer, and that is their only
goal bar none. It's just a dumb argument.

Nobody said that. But it is dumb to knowingly deploy a script that
isn't even consistent across *IE* versions. Even dumber for these
"practical" Ajax sites to jarringly exclude all IE users who have
ActiveX disabled. And oh BTW, it fails in lots of other agents as
well. There's really no argument for such a thing. But then, that's
never stopped you.
 
S

S.T.

RobG said:
Yahoo! is not a paragon of browser development. Last I saw, their
marketshare was slipping so badly they had to do a deal with MS to
survive. Whatever they are doing now, it's not working for them as
well as what they were doing before.

Maybe if they'd switched to jQuery they'd be back on top of Google.

Yahoo's doing fine as an overall entity, though yes... losing market
share in search (which is browser-neutral). They made $400mil last year
on revenues of $7B+. I'm fairly certain the decision to ignore certain
browsers wasn't made on a whim.

Google most-famously doesn't bother supporting Opera. Try creating a
Google doc spreadsheet with Opera and see what happens, or see the
latest GMail interface. Won't happen. The horror! Yet they manage to do ok.
Yes, they'll switch sites very quickly and if it works better for
them, that's where they'll stay.

So, you're suggesting some user downloads a new niche browser and finds
the sites they visit don't work as expected -- they're going to visit
other sites rather than ditch this new browser? Good luck with that.
Read the history of the rise and fall if IE 6. Maybe all browsers
should just have emulated it and forgotten about innovation. Maybe all
those Linux and Apple freaks should just ditch their niche machines
and the whole world should run Windows. While we're at it, lets kill
anything other than Vista or Win7, who cares about anyone who can't
afford the latest and greatest PC and OS?

I think you're missing the point. IE6 (which was unbelievably
successful, by the way -- even though it's a pile of garbage) is the
reason things like 'Graded Browser Support' exist. Site developers are
no longer letting the browsers dictate the terms. It's a good thing.
What was the WWW all about anyway? Glad we got rid of those bleeding
heart lefties...

I see. You're viewing the WWW as some sort of grand social experiment.
Again, that's fair enough for the public sector. A huge chunk of the web
is commercial in nature though and their interest is profit, not sharing
content with all the world's citizens.
[...]
Like it or not, content now controls standards.

If content is king, development tools should aim to maximise access.
Selecting tools that deliberately marginalise a measurable number of
potential consumers is inconsistent with that logic.

The market is fairly rational. If it was more profitable to cater to a
lowest common denominator surfer the practice would be MUCH more
prevalent than is currently the case.
 
G

Gabriel Gilini

s/possible/practical/
s/practical/profitable/

There, I fixed it for you.

The fact that developers are blindly telling their bosses that Safari
2, Konqueror, X, Y or Z are not used anymore, and that they'll be just
fine using the lib-of-the-moment does not automatically validates that
as the best alternative.

I'm sure that a great share of those using jQuery could improve their
reach - and therefore, their profit - with a small investment.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top