i want to alert something when the scroll reaches the limit of the page, like this:
$(function(){
$(document).scroll(function() {
if($(document).scrollTop() == 0) alert("top");
})
})
But without jQuery.
I'm beginning Javascript development and as a beginner in JavaScript I make a lot of mistakes. The way I'm developing is very counter-productive because every mistake I fix I have to shutdown Glassfish, re-build the app and re-deploy it. My app is a Java back-end with REST services and the Html, ...
I am working on a plugin and I need to pass PHP array to Javascript array.
I have tried using join(), implode() and even Json_encode. But, the wordpress is not displaying any value.
When using join(), I used the code:
<?php
$php1 = array(1,2,3);
?>
<script language='Javascript'>
va...
I remember the good-old-days (not really) back when I was still sucking the teet of Dreamweaver to build websites and the lure of playing copypasta with fancy built-in scripts (ex, image-swap) was like black magic.
I'm pretty far removed from that now days but I was adapting a small site from it...
I'm considering the use of GWT for next project. We already know java and the front-end its already writteng in Android java (not the same at all, but its a starting point).
We are also considering enyo framework, from HP's webOS. Its seem interesting and its only javascript for everything.
Do...
For the next project we would use a javascript framework.
We want to make a "fat client" app connected to our rest server.
Considering enyo from HP (former webOS). But want to know for any other experiences of same sort of frameworks, except Sencha.
It's an EcmaScript.next feature that is being tested in newer versions of JavaScript interpreters but it's not yet standard.
http://wiki.ecmascript.org/doku.php?id=harmony:iterators is the proposal page. Some day relatively soon something like that should be part of a new version of EcmaScript,...
@HarryBeasant Just a note. Don't forget that this element is not supported in the latest version of IE. Not that I'd personally care about IE but you might.
@RakeshJuyal it is a fine, a ban, and possibly jail time if you get caught. now on the side note, you are actively helping the company find loopholes and bugs in the software.
if you're good, after serving a minimum sentence, they might just hire you
i'm not wrong, I just haven't considered the case. I do not see a problem with my API design re: the success/failure, you just disagree with it. that is cool. The other suggestions are very valid and I missed them. :) Thankyou.
but it's not like I came in here saying "this is the right way to do things, jQuery 4Life!"
Clientside useragent detection is known to be bad, however is it also bad to react differently based on the incoming useragent in a HTTP request
An example would be sniffing the types of browsers out of all img requests and sending smaller or larger images based on whether the incoming userAgent...
@Raynos I'm a fan of just have everything default to "the right way" for your specific project, then over-ride through some mechanism when you have those corner-cases.
commented: If you honestly don't think you deserve to be shot for using selectors with value='" + lulz + '" then you should probably learn what good code is