www.webdeveloper.com

Search:

Type: Posts; User: JohnMerlino

Page 1 of 2 1 2

Search: Search took 0.02 seconds.

  1. jquery submit function not doing anything

    Hey all,

    This for some reason does not trigger alert:


    <script>
    $('form').submit(function(){
    alert('hello');
    return false;
    });
  2. yes, I missed the forward slash!

    yes, I missed the forward slash!
  3. regex returns false, when it should return true

    Hey all,

    I have a regex here:



    var NameValidator = {

    first_middle_last_with_first_middle : function(txt){
  4. jquery themeroller does allow me to edit an existing theme

    Hey all,

    I go to http://jqueryui.com/themeroller/
    And I select gallery
    Then I choose "edit" for the Redmond theme to customize theme

    But all it does is update the theme to reflect Redmond...
  5. Thanks for response. And those external...

    Thanks for response.

    And those external references can't be just put anywhere in execution code because that object literal defined scope, so this wouldn't work:



    ({
    init3 : function(){...
  6. So if you don't assign the result of object...

    So if you don't assign the result of object construction to a variable, but rather just define one anonymously, its own members temporarily available as long as you use dot notation to access them?...
  7. How immediate object initialization works in JavaScript

    Hey all, there's this line:


    ({

    maxwidth: 600,
    maxheight: 400,

    gimmeMax: function () {
    return this.maxwidth + "x" + this.maxheight;
  8. eh, I guess the first option technically does...

    eh, I guess the first option technically does what the other two do anyway. Since it's self-executing and returns an object literal.
  9. Thanks for response. So it's impossible to create...

    Thanks for response. So it's impossible to create the closure I am looking for when assigning an object literal to prototype property?

    Will I be forced to do this?


    Love.prototype = (function...
  10. why closure works in constructor but not in prototype?

    Hey all,

    I'm not sure why this:



    console.log(instance2.getAnotherKey()());

    returns Object { a = "a" }
  11. Replies
    5
    Views
    2,698

    Thanks your explanation was the best.

    Thanks your explanation was the best.
  12. Replies
    5
    Views
    2,698

    I'm looking at this from memory position angle....

    I'm looking at this from memory position angle. Because F's prototype points to the same memory position as P's prototype and because prototype is an object and objects get passed around by reference...
  13. Replies
    5
    Views
    2,698

    prototype inheritance

    Hey all,

    In this line:


    function inherit(C, P) {
    var F = function () {};
    F.prototype = P.prototype;
    C.prototype = new F();
    }
  14. No one has any clue why firebug reports this...

    No one has any clue why firebug reports this error?
  15. firebug: missing : after property id drop-filter: {\n listviews

    Hey all,
    I get the error message mentioned in the title in this script:


    <script>
    (function($){

    var listview = $('#listview');

    var lists = (function(){
  16. Replies
    1
    Views
    1,478

    I figured it out. You have to convert the...

    I figured it out. You have to convert the functions into closures using return keyword and then call the function immediately ()() before you try to use it as a private function.
  17. Replies
    1
    Views
    1,478

    firebug: lists.create is not a function

    Firebug barks "lists.create is not a function" when I click on the link below:


    var lists = function(){
    var create = function(component){
    var component =...
  18. Replies
    0
    Views
    1,008

    Value incorrectly always returns 1

    Hey all,

    I have four images:



    <div class="main_view">
    <div class="window">
    <div class="image_reel">
    <a href="#"><img src="images/1.png" alt="" /></a>
  19. strange behavior in javascript animation fading in and out

    Hey all,

    Don't know why javascript behavior acts strange - the correct paragraph fades in right away BUT then back out again, and the wrong one fades in and then the wrong one keeps fading in no...
  20. Yeah I know what // does. But the code commented...

    Yeah I know what // does. But the code commented out has nothing to do with the problem.
  21. Links aren't hiding when they're supposed to

    Hey all,

    I have a back button and a forward button. When the first paragraph fades in, back button should be hidden. When the last paragraph fades in, the forward button should be hidden. Yet,...
  22. Replies
    1
    Views
    2,557

    jquery get() method

    Hey all,

    I understand that jquery get() method takes a url parameter and additional object literals as a parameter:


    $.get("test.php", { name: "John", time: "2pm" } );

    My question is...
  23. understanding calling a function with prototype property

    In the below code, the alert message returns in one instance: 'someAnimal is [Mammal "Mr. Biggles"]'
    I don't understand how this is possible. We pass as an argument 'Mr. Biggles' to the Mammal...
  24. javascript accordion - tracking time question

    Hey all,

    I was reading up on this javascript tutorial:
    http://www.switchonthecode.com/tutorials/javascript-and-css-tutorial-accordion-menus
    Basically, it shows you how to create an accordion...
  25. Replies
    5
    Views
    6,481

    Thanks for the in-depth reply. By the way, do you...

    Thanks for the in-depth reply. By the way, do you know any good javascript books focused purely on game development. I find tons of them using actionscript and flash, but have found none using...
Results 1 to 25 of 26
Page 1 of 2 1 2
HTML5 Development Center



Recent Articles