Search:

Type: Posts; User: kayut; Keyword(s):

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Intersection Observer - The last images doesn't show

    I'm trying to understand the Intersection Observer API.

    In my test, I send a HTTP request to an API, map over the API response and list some images. Then, I use intersection observer to lazy load...
  2. Getting more than 10 images out of an API request to Unsplash API

    When I send a /search/photos request to Unsplash API, I get a response with only 10 images.

    Is it possible to get more than 10 images?
  3. Thanks for your help. The code is already been...

    Thanks for your help.
    The code is already been fixed.
  4. Looking for a jQuery/JS solution to make a Youtube video responsive

    Hi,

    Looking for a solution to make a Youtube video iframe responsive I found this page:

    Fluid Width Video

    Now I'm trying for hours to apply it on my code example here:

    Trying to make it...
  5. Replies
    1
    Views
    1,049

    How can I rewrite this with Ternary Operator?

    HI,

    How can I rewrite this with Ternary Operator?


    face.textContent = result == 0 ? headNr + ' times ' + resultFace : tailNr + ' times ' + resultFace;

    I tried everything, but couldn't find...
  6. I couldn't find any solution with Handlebars.js,...

    I couldn't find any solution with Handlebars.js, so I did it in JavaScript



    (function removeNoImage() {
    for(let key in data.staff) {
    if(data.staff[key].image_url.indexOf('questionmark')...
  7. Handlebars.js - Show data only if {{ image_url}} doesn't contain "questionmark"

    Hi,

    As you can see in this example, which I created on Codepen, some of the data don't have an image and whenever there's no image, a place holder image is shown:

    Handlebars.js Example

    Is...
  8. Promise.all and Handlebars.js - Combining the results of two API requests in one list

    Hi,

    In the following example I'm using fetch.all to combine two different API requests.

    fetch.all and Handlebars.js

    The unordered list, which is created by using Handlebars.js is showing all...
  9. Replies
    0
    Views
    611

    Map works but forEach is not working. Why?

    Hey,

    Can some one please explain to me why this works:


    let fruits = ['apple', 'orange', 'lemon'];

    let output = fruits.map(function(item){
    return item;
    });
  10. Replies
    0
    Views
    482

    Closures - Local vs Private

    Hey,

    When I read about Closures, it's often said that we are using Closures to create private variable, that cannot be accessed outside the function.
    But isn't it that this is true for all local...
  11. Replies
    0
    Views
    622

    The best way to instantiate a new object

    Hey,

    There are 3 different ways to create a new object:

    let myObject = {};

    var myObject = {
    name: “Engage",
    days: 30
    }
  12. Replies
    0
    Views
    707

    JavaScript Constructor

    Hey,

    The following two constructor functions do the same job. But what is the difference between them and which one is more recomended?

    First function



    // we define a constructor for...
  13. Replies
    6
    Views
    1,072

    Sure, but the only thing I had to change in my...

    Sure, but the only thing I had to change in my example to make it work, was changing {{#each}} to {{#each this}} and it's working now:

    https://codepen.io/itsthomas/pen/qoqMWz?editors=1010


    PS:...
  14. Replies
    6
    Views
    1,072

    Dear @John, Thank you sooooooo much for your...

    Dear @John,
    Thank you sooooooo much for your help and the time you invested to help me. I really appreciate it.
    1000 Thanks again.
  15. Replies
    6
    Views
    1,072

    Accessing an API using Handlebars.js

    Hi,

    I'm able to access this API and show that one product inside the API:

    API for one product


    Now I want to display more than a product by accessing another API which is an array of...
  16. JavaScript touch event - controlling the amount of horizontal movement

    Hi,

    I'm just learning the JavaScript touch event. For this I created this example:

    Example on Codepen

    In the above example, you can grab the element and move it to the right or left.

    It...
  17. Replies
    0
    Views
    831

    Hide all elements except of the first 4

    Hi,

    In the following script, each time you click the button it shows 4 more elements:

    Load 4 more elements

    I need to change the script so that when all elements are visible and you click...
  18. Replies
    3
    Views
    1,008

    But this solution seems to be for Bootstrap...

    But this solution seems to be for Bootstrap carousel. Can I use it for my custom build carousel too?
  19. Slick slider - removing the horizontal scrollbar

    Hi,

    I created an example to use Slick slider here:

    Slick Slider Example

    It works, but it shows the horizontal scrollbar and I can't find how to fix it.
    Could you please help me to get rid...
  20. Replies
    3
    Views
    1,008

    Adding touch screen to a Carousel?

    Hi,

    I have created a carousel here:

    http://codepen.io/itsthomas/pen/NpdWmj

    But it's not working with touch swipe on touch screens.
    Is there any way I can modify the code, so that it support...
  21. Replies
    1
    Views
    573

    Changing If statement to switch

    Hi,

    I'm trying to change this if statement to a switch like this:

    Before



    if ($(this).attr('id') === 'right') {
    if (tabindex === slides) {
  22. Hi, Thanks for your answer. Can I also achieve...

    Hi,
    Thanks for your answer.
    Can I also achieve to show part of previous and part of next images too (as showed in my example)?
  23. Which Slider (Carousel) can I use to create something like this?

    Hi,

    I need to create a carousel (slider) which should like something like this:

    Which jQuery (or any other) carousel can I use for it?


    Thanks
  24. Replies
    1
    Views
    570

    Outputting key from a JSON file

    Hi,

    If this is the JSON:



    [
    {
    "question": "What's a Dog?",
    "answer": "The domestic dog is a member of genus Canis that forms part of the wolf-like canids, and is the...
  25. Replies
    2
    Views
    666

    @jscheuer1, WHAT A GREAT ANSWER! Thank you so...

    @jscheuer1,
    WHAT A GREAT ANSWER!
    Thank you so much!
Results 1 to 25 of 29
Page 1 of 2 1 2