Skip to content

Tag: jquery

How to fetch data properly for this API? (array)

console.log screenshot Hi, I am using “fetch” method with API for my website, and this API shows book information, if books include the input title. Screenshot attached is console.log result when typing an example book title. I’d like to get every title info of each array, could anyone can h…

How to close browser after form has been submitted?

I am trying to submit a form and then the browser has to close. But I cannot understand why it will not work. For some reason, it will close the window, but it does not submit the form. Tried to submit the form with jQuery and then close the window Answer I see you are using jQuery, you can use

JavaScript not working inside HTML Ajax loaded content

I am having an issue when trying to run JavaScript inside an Ajax loaded content on a webpage. I keep getting an error “Cannot set properties of null”. If I move the output of the script to the footer for example which is outside of the Ajax loaded content, the script works fine. This is the piece…

How to make a 3D carousal Inner rotation view?

I wanted to make a 3d rotating carousel like in the stack snippet, but required is a view from inside like in the image below. How can i achieve this? Answer The carousel needs to be rotated and translated in the opposite direction to make it an inner rotation view. The transform-origin sets the center of the…

Change meta title based on url #id

I have a static html website. Our server does not support php/c# etc… Can JS / JQuery / Ajax or others do the following: If the url is: Https://example.com/page , the meta title will be e.g. “home page”. Https://example.com/example#1 , the meta title will be to “new meta title” Https://example.com/example#29 …

Hide an element per multiple scrollable divs

I am trying to fade out a logo at the top of three divs onscroll. I would like it so when a user scrolls one div, the logo fades from div that is being scrolled, not all of them. There is also a problem with scrolling to the top again, the logo is faded. It should return to full opacity.