Skip to content

Author: admin@master

How to disable the inputEl of a textfield in ExtJS?

I am working with ExtJS and I have a textfield component. I would like to disable only the inputEl of a textfield component (not the label). If I use the setDisabled() method of the textfield, then it sets disabled the inputEl but also the label. I have used also the setReadOnly() method, but it does not grey…

Detecting Browser History Actions

I am building a Html 5 website using push state and I wondering whether its possible in javascript or JQuery to detect whether the browser’s back button has been pushed. I would like to include it in an if statement like so: Answer You’re looking for the popstate event. An example: Or with the eve…

How to programmatically trigger a D3 drag event?

So i have some data binded with drag event listeners : Now I want to call this onDrag function on a certain node programmatically. I do know the same is possible with standard events by doing Is there any way to do so ? Thanks. Answer Save the callback (the one you pass into the drag handler) in a variable

Styling a voting system

I have made a sample voting system here: Sample Voting System However after repeated attempts I couldn’t get it to style the way I want because the developer has used way too many divs here. Either the font becomes too big or gets overlapped with the number or goes out of proportion, etc. I want it to l…

Add a space on top of a #page HTML link

When I have a link that loads a section within the same page, the link will make the section clicked on load at the top of the browser window, I need to somehow add a space/gap of like 100px on top of all these sections that are linked like this. Any ideas on how to do this? Answer In your