Skip to content
Advertisement

Tag: jquery

CreateElement with id?

I’m trying to modify this code to also give this div item an ID, however I have not found anything on google, and idName does not work. I read something about append, however it seems pretty complicated for a task that seems pretty simple, so is there an alternative? Thanks 🙂 Answer You should use the .setAttribute() method:

Blur event stops click event from working?

It appears that the Blur event stops the click event handler from working? I have a combo box where the options only appear when the text field has focus. Choosing an option link should cause an event to occur. I have a fiddle example here: http://jsfiddle.net/uXq5p/6/ To reproduce: Select the text box Links appear Click a link The blur even

Make element scroll slower (Parallax)

I have an element on my page absolutely positioned. Im trying to write a snippet of jQuery to make that element scroll at a slower rate than the rest of the elements on the page. I’ve written this so far but cannot seem to get it too work at all. Has anybody experience with this and if so would you

Open new window on background div click

I am using CSS to apply a background image to a div tag that wraps all of the content on a website. And the CSS id with the background property… PROBLEM: I’m trying to figure out how to open a new browser window to a different URL whenever the background image is clicked upon. I have tried doing this using

How to create HTML select option from JSON hash?

I have a simple JSON code: I have a select tag in my HTML: I need a simple way to create HTML select box from this JSON, like this: Answer Just for kicks here is an answer in pure javascript, also you probably do not need an array for this just a simple object will suffice

Javascript to list all files in directory on the webserver

I know how to do this in server side languages but I was wondering if there is an easy way (as in no active X). Google searches only give me ways for javascript to list files from the user’s computer. How can I use javascript to list all files on the server. That is, if I have a folder /gallary

DOM change event for Opera

So far I found how to do it in Chrome, the DOMSubtreeModified event: Is there a JavaScript/jQuery DOM change listener? Apparently it works in Firefox and IE 9 too. Do you know solutions for detecting DOM changes in other browsers such as Opera? And maybe older versions if IE, because I’m sure the event above doesn’t work in IE 6-7-8…

Advertisement