Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pause a jquery slideshow so that I can target the node element in chrome dev tools

It may be a setting of some kind in the Chrome dev tools that I am missing. My goal is to pause a slideshow on my web site so that i can use the inspect element tool to target a html element and figure out the css that it uses? Clearly this is impossible to achieve while the animation is set to automatically run.

Is there a way of pausing the animation while I inspect the element for it's css properties?

like image 758
Jonathan Beech Avatar asked Jul 19 '14 19:07

Jonathan Beech


People also ask

How do I pause JavaScript execution in Chrome?

Solution 1: Manually pause JavaScript executionIf you open the Chrome devtools ( ⌘ + ⌥ + J or ⌘ + ⌥ + I ) and go to the Sources tab, you will be able to pause the execution of JavaScript that is running on the page. The JavaScript execution can be paused using a keyboard shortcut ( ⌘ + \ ).


2 Answers

If you go to the "Sources" tab in web inspector there's a pause button in the debug controls.

enter image description here

Unfortunately, you won't be able to right-click an element to inspect it when paused, but you can locate it using the magnifier icon or on the Elements tab by expanding and hovering over elements and observing the highlight in the main document.

like image 149
CupawnTae Avatar answered Sep 21 '22 06:09

CupawnTae


If you want to pause a Bootstrap 4 carousel, you can open your Javascript console ( + option + J on a Mac or ctrl+ shift + J on Windows for the Chrome Browser) and then type:

$('.carousel').carousel('pause'); // then press the [enter/return] key

Where the ".carousel" is the name of the class (hence the dot) that cointains the carousel. If it is an id, like #welcome you can just use:

$('#welcome').carousel('pause'); // then press the [enter/return] key

like image 42
Jonathan Soifer Avatar answered Sep 19 '22 06:09

Jonathan Soifer