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 out the inputEl,
Content flicker/jump on infinite scroll/loop
I am looking for help / a point in the right direction / or a solution for a flicker/jump, when scrolling on a looping/infinite website, which can be seen in this fiddle. What seems to be causing the jump is: “$(window).scrollTop(half_way – child_height);”, and what could also be a Chrome windows scrollTop bug, but it is happening in all browsers
Change font-size in auto-generated HTML from px to em using javascript
I have an HTML generated from a web service which I cannot control. The HTML has font sizes in px and pt. My requirement is changing all font-sizes to em. This is what I tried : I tried to access all <font> tags using : However, it is returning null even though I have many font tags in HTML. All
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 ever-popular jQuery: This fires whenever history
“Cannot read property ‘content’ of null”: Psuedo Elements
I adapted some code from here in order to detect orientation changes in my Phonegap app (to load different CSS files for landscape and portrait). I’m getting a “cannot read property ‘content’ of null error, implying there’s something wrong with the DOM call. The code involves adding these psuedo elements to the primary CSS file: And this event listener to
Safari Developer Tools: How to Preserve Console Log Upon Navigation?
When using Safari Web Inspector to read the JavaScript console output, the log is reset upon navigation i.e. going from page index.html to mail.html clears the console output. In the Chrome Developer Tools, I can easily preserve the log by right clicking on the console space and selecting Preserve Log Upon Navigation. With this option, console log output remains intact
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 look something like
How to convert JSON object to JavaScript array?
I need to convert JSON object string to a JavaScript array. This my JSON object: And I want to have: How can I achieve this? Answer http://jsfiddle.net/MV5rj/
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