Skip to content
Advertisement

Tag: jquery

Catch scrolling event on overflow:hidden element

Any insights on how to catch a scrolling event on a element that has overflow:hidden? I would like to scroll in a column without showing a scrollbar to the user. Answer This is actually a somewhat indepth process. What I do is set global flags when users mouse enters and leaves the element that you want to scroll. Then, on

Backbone and jQuery events

I have a simple task – retrieve click listener function from DOM element. I’ve fased two problems: I have no idea how to obtain event listener, that was set via addEventListener function $(element).data(‘events’) is always empty Talking about first problem – I think it’s not critical as I’m using this function only in one place. But the second problem is

JavaScript test if a CSS stylesheet is applied with CSS3 media query

I have two style sheets: The second one should only be loaded when the window is 800px or wider (narrower displays get a layout more appropriate for mobile devices). The JavaScript needs to know if that second style sheet is being applied, I have tried the jQuery: But when you get around the 790 – 810px width, Chrome/Firefox (and probably

Fadeout all nested divs

On my page I’m trying to do smth like that: Lets say, when we click on some link with id min_reg it animates div with idftr_form_cntr, and shows another div tcr_form_cntr within. There are 3-4 links that does same function but shows another div within ftr_form_cntr. Well if user clicked one of this links for the first time then there

JavaScript Regex to match a URL in a field of text

How can I setup my regex to test to see if a URL is contained in a block of text in javascript. I cant quite figure out the pattern to use to accomplish this EDIT: So the Pattern I have now works in regex testers for what I need it to do but chrome throws an error for the following

Preloading a youtube embed

I want to have an embedded chromeless youtube video preload its video WITHOUT playing when the page loads. Right now I’m using an awkward “play then quickly pause” script which causes small problems (half-second audio leaks and fails quite a bit). For this seemingly simple functionality, is there a better/more elegant way to preload? Answer I had the same question

Advertisement