Jump to content

All Activity

This stream auto-updates     

  1. Today
  2. I have an intersection observer for one animation, but i want to use window.requestIdleCallback() Where I should add the code window.requestIdleCallback(callback_1)? my script: if (document.querySelector('#weddings')) { let observer_1; let Element_1; let prevRatio = 0.0; let options = { root: null, rootMargin: "0px", threshold: buildThresholdList() }; // Set things up Element_1 = document.querySelector("#img-1"); initObserver(); ////////////////////////////////////////////////////////////////////////////// function initObserver() { observer_1 = new IntersectionObserver(callback_1, options); observer_1.observe(Element_1); } ///////////////////////////////////////////////////////////////////////////// function buildThresholdList() {...} ///////////////////////////////////////////////////////////////////////////// var gallerySroll_1 = anime({...}); //////////////////////////////////////////////////////////////////////////// function callback_1 (entries, observer_1) { entries.forEach((entry) => { if(entry.boundingClientRect.top <= 0 && entry.intersectionRatio != prevRatio){ gallerySroll_1.seek(gallerySroll_1.duration * (entry.intersectionRatio)); }else{ gallerySroll_1.seek(1000); } prevRatio = entry.intersectionRatio; }); } } if I add the code at the start after the if before anything i got the error: TypeError: entries.forEach is not a function callback_1 https://alessiopaolettidesign.it/ph/js/main.js:343
  3. Yesterday
  4. Seventy items long seems excessive (to me). Is there no way to break the list into smaller groups by being more specific about the contents displayed? I don't know what your dropdown looks like, but as an example for a main heading of "Clothes" followed by all kinds of clothes I would break the clothes topic into smaller groups of 'Shirts', 'Blouses', 'Pants', 'Skirts', 'Ties', 'Scarfes', etc. I think any list longer than about 10 items should be split into smaller lists, even if the split is, for example, by alphabet: a-g, h-o, p-z
  5. Last week
  6. Sure! https://www.w3schools.com/sql/sql_count_avg_sum.asp
  7. Don't understand your question
  8. I try to use Tampermonkey to get download url but it does not get download url using window.location.href Is that not possible? I could not find any infomation about getting download url I Just want get download url to see it without having to open downloads, console or fiddler 2
  9. It's optional, I don't see a reason to use it.
  10. Ok! Lets leave unanswered until code or link is supplied, because if the code is exactly as tutorial it should work! So its more likely you have an error in the code or conflict somewhere for it to not work.
  11. The code is the code provided on the tutorial page I linked. Literally copy and pasted the html, css, and js. I want to know what line in that code is supposed to solve my problem, or if there's another method.
  12. I can't specify the part to solve your problem because you HAVEN'T SUPPLIED WHAT YOU HAVE USED IN YOUR CODE.
  13. So right here's you're two tasks you need to do as you've stated (just to get my head around it) Show and hide test_2 when test_1 is checked and unchecked respectively. When test_1 is not checked, you want to pass test_2 as NULL You seem to be using PHP so that makes it simple for me. Your first issue is that you aren't calling your Javascript code. You're defining it as a function, but not calling it. It isn't running. Add an onclick attribute to your test_1 checkboxes to get that JavaScript to run. You'll need to modify it as you've removed the div ids, but you seem to have that under control. The second part is a joint issue between your HTML and your PHP. You'll need to add some value attributes to your checkboxes, so some values are sent through on a form submission. Then inside your PHP you'll just have a bit of logic: if test_1 value is not set (unchecked checkboxes do not send a value) set test_1 to no set test_2 to NULL else set test_1 to test_1 value if test_2 value is not set set test_2 to no else set test_2 to test_2 value Save test_1 and test_2 into database Let me know if any of this is unclear.
  14. Cheers mate that's brilliant - would you mind maybe specifying what part is supposed to solve my problem?
  15. Well that would be because your alert code is inside your Focus function and not your Blur function. So the alert is executing (after you've focused), then when you close the alert it refocuses which causes the alert again.
  16. I incorporated the "Dropdown in TopNav" code, but I have a dropdown list that's over 70 items long. How would I incorporated a scrolling function to this menu, or make it possible to view all the entries by scrolling down using the mouse wheel? Thanks!
  17. On the tutorial for an image gallery slideshow (https://www.w3schools.com/howto/howto_js_slideshow_gallery.asp) the example starts with the first image enlarged. The code they provided doesn't apply that to my website, I have to select an image to enlarge it, is there something I can add? Thanks
  18. Can I use SQL to find Mean and Standard deviation of a data?
  19. is it compulsory to declare dir Attribute doesn't the lang="en" is self explanatory should we use it sparingly or declare for specific purposes
  20. I am pretty new to javascript and node.js. I am wanting to display some text using document.getElementById('txt').innerHTML= "some text" followed by a node module : var spawn = require('child_process').spawnSync; child = spawn('ffmpeg',['-y -i ',some_file , result_file ], { shell: true }); (which takes some time) and then document.getElementById('txt').innerHTML= "some other text"; However it only disp[ays the second lot of text after the external program has finished. I had assumed that as I am using the synchronous version of spawn that the first line would get displayed first, how can I do this? Thanks
  21. How to alter the table in below format . kindly provide the queries for mysql workbench Pack Keys: Pack All Row Format: Compressed
  22. W3Schools main website and W3Schools forum isn't reachable via IPv6. Thus resources from it can't be received using IPv6. It would be nice if you fix it by enabling IPv6 in these sites. Thank you.
  23. oZorNick

    Dropdown menu.

    Good afternoon! Please help me. Menu 4 does not open correctly. What is wrong with the css code? https://www.w3schools.com/code/tryit.asp?filename=G9TT8UGP1E73
  24. Check $row["StoryHeadline"] instead of row["StoryHeadline"] 
  25. $row is clearly a string that begins with "r". You will have to show the code that is assigning a value to $row.
  1. Load more activity
  • Create New...