Showing posts with label Javascript. Show all posts
Showing posts with label Javascript. Show all posts

Wednesday, April 5, 2023

How to close browser window or tab once click on button / link using jquery and Javascript

Hi, Today I will explain about how to close a browser winow when click on a button or link using Javascript or Jquery, Below piece of snippet work for only CHROME and IE 11 onwards browsers only. The browser does not allow this behavior. Javascript can only close a tab that it opened. Scripts may close only the windows that were opened by it. This solution will only work if the window...
Continue Reading →

Friday, January 20, 2017

Back to top page scroll using Jquery, CSS, HTML5

Hi, Today i will explain about how to scroll page to top from bottom. This "Back to top" link allows users to smoothly scroll back to the top of the page. It's a little detail which enhances navigation experience on website with long pages. This resource is suitable for website with lots of page content. The link fades in on the right-hand side of the content area, after the browser window has...
Continue Reading →

Thursday, January 19, 2017

Javascript shorten string without cutting words (Or) Javascript trim multiline string without cutting words

In this article i will give Javascript code for trim multiline string without cutting words. Here i am giving an example, say i had the string text = "this is a long string i cant display" i want to trim it down to 10 characters but if it does't end with a space finish the word i don't want the string variable to look like this "this is a long string i cant dis" i want it to finish the word...
Continue Reading →

Popular Posts