Skip to main content

Forums

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 66 total)
  • Author
    Posts
  • in reply to: Performance issues #207130

    Chromawoods
    Participant
    • Not sure how to address your first point. We are talking about this implementation of the theme and what makes the rendering performance poor, right? The cached result dropped to ~1s for me, so that’s a pretty obvious hint that the downloading of resources is a problem
    • For mobile, I would either get rid of a lot of images completely, or make sure that smaller images are served and not the huge ones. Not sure if that background effect is useful on a smartphone anyway? And generally, consider serving assets from a CDN

    Not sure what you mean by that last sentence either. If the number of plugins have a negative effect on performance, why is that not relevant? And what do you mean by the theme itself? Perhaps I am misunderstanding. :)

    in reply to: Performance issues #207125

    Chromawoods
    Participant

    Opening the Network tab in Chrome dev-tools, we can see that there are 127 requests being made with a grand total of 5.3MB. Maybe start there? :) background2.png took almost 13s to load for me right now. You need to do something about that.

    How are you planning to optimize this for mobile devices? It seems that you are loading the same resources there too? That same background image takes about half a minute to download on a 3G network. I sure wouldn’t want to visit that site using a smartphone..

    There are several other images that are quite large. Try to optimize, lazy load or remove them.

    The Google Map is loading a lot of image resources, it seems. Maybe you could hold the map loading until the user is actually anywhere near it?

    There might be other pain points. This was just the most obvious problem that I saw just glancing at the site.

    in reply to: Simple Jquery slideshow that works #206786

    Chromawoods
    Participant

    @shikkediel yes you are right, that works too. I have updated the pen.

    But yeah, I agree with @beverleyh that nowadays jQuery is probably overkill for such a thing.

    in reply to: Simple Jquery slideshow that works #206775

    Chromawoods
    Participant

    You are pretty close. The part where you fade in the next slide also needs to be within the callback of the previous slide’s fadeOut function. Check out this pen:

    in reply to: Fade background image with click #202568

    Chromawoods
    Participant

    Something like this? You need to pass a callback function for when the fade out function has finished. In my example, I toggle a couple of classes and then begin fading in.

    in reply to: Javascript image and text array, formatting help! #200963

    Chromawoods
    Participant

    Even without knowing how your HTML and CSS looks, I would not recommend using document.write:
    http://stackoverflow.com/questions/802854/why-is-document-write-considered-a-bad-practice#answer-802943

    in reply to: Console Logging a Method That's Inside an Object #198273

    Chromawoods
    Participant

    The return value you get when calling john.askTeller() is a function itself, which is why you first store it in myBalanceMethod. You could call it directly by doing john.askTeller()() but that’s a bit weird.

    I’m not sure what the restrictions of this particular course are, but instead of askTeller returning return returnBalance; you could instead return the result of it: return returnBalance();. But again, I don’t know if that would violate what the course is trying to teach you.

    in reply to: Reloading javascript at orientation change #194052

    Chromawoods
    Participant

    If you find yourself doing this a lot, then you might want to use something like jRespond:

    https://github.com/ten1seven/jRespond

    in reply to: [Grunt] Can't get watch working… #182472

    Chromawoods
    Participant

    I think you need to define a file pattern within the watch task. So if you just want to watch any file within the images folder, you would do files: ['images/*'] or if you have sub folders you can do it recursively with files: ['images/**/*'].

    in reply to: Center google map not working #182320

    Chromawoods
    Participant

    It is because you are doing map.setCenter(marker.getPosition()) inside your setMarkers function. So the map will center on every marker, which is why in the end it centers on USA, because that’s the last marker being added.

    Just remove that line from setMarkers and it will center correctly.

    in reply to: I can't figure out why a JS text scroller isn't working. #181770

    Chromawoods
    Participant

    One potential problem is that you are not specifying a unit (px, em, % etc.) for the top property. But in general though, the solution looks pretty dated. :) Take a look at this code, I cleaned it up a bit for you. It is by no means perfect but it could serve as a starting point perhaps.

    You could also use something like Velocity.js.

    in reply to: I can't figure out why a JS text scroller isn't working. #181634

    Chromawoods
    Participant

    Maybe first explain how it should work? :)

    in reply to: Set Value if variable is Not NaN. #180909

    Chromawoods
    Participant

    checked it via if (sum!== ‘NaN’)

    'NaN' is a string, NaN is a number if you check it using typeof :/. Also, NaN === NaN turns out to be false which is confusing and f*cked up but we can use isNaN() to avoid that.

    However, I don’t think I would have solved it that way. Assigning NaN to a variable seems weird I think.

    in reply to: Set Value if variable is Not NaN. #180906

    Chromawoods
    Participant

    You are not checking the sum for NaN, you are checking it for '' (empty string). So you could replace if (sum !=='') with if (!isNaN(sum)) and it would work.

    in reply to: [Solved] Nivo Lightbox Problem #179990

    Chromawoods
    Participant

    @paulie_d I think the reason why it works now is that @mintdesigner fixed the problem before you had a go at it. :)

Viewing 15 posts - 1 through 15 (of 66 total)
icon-link icon-logo-star icon-search icon-star