Hi All,
I have a large nested list that I am trying to animate using jquery slideToggle. I want the individual nested lists (id="Nested" + counter) to animate separately, so that a user could toggle a list to display/hide without affecting the others. The animation would be triggered by the corresponding "trigger_Nested" (+ counter) lin...
Firebug is complaining about this line:
$("#original-description").text(response['course']['original_description']).hide();
Do I have a syntax error? Looks fine to me.
More context:
bindOnSuccess($('#course-search'), function(response) {
if (!response) {
$("#system-status").text("Sorry, no course could be found for that ...
I have a contenteditable div that I want users to be able to select a portion of, and then click a button to wrap a div with some class and styles around.
The div I want to wrap around:
var newNode = $('<div class=\'selectedFont\' style=\'text-align=center;\'>');
The methods I need to use are in the title, I'm looking for an example....
I just came across this piece in the Mozilla Javascript documentation:
var len = this.length >>> 0;
I don't quite understand why this is being done. What good does zero-fill right shifting this.length by 0 do? As far as I understand, it does exactly nothing. Is it to safely establish a default value for len, even if this.length is n...
I have a file uploader module. The UI is created using simple HTML and Javascript.
Server side I am using Java code. I want to check the type of the uploaded file.
...
I'd like to allow a user to be able to enter a list of IDs into a textarea and allow the IDs to be seperated by whitespace such as a new line as well as by commas.
Then I'd like to convert that into an int[] or throw an error if the string is bad: contains letters, decimals, etc.
But I'm having trouble working it out.
Can anyone give ...
I need to convert strings pasted into a text area so that, if they were pasted from MS Word, the weird quotation marks and apostrophes that Word likes to use will get converted to regular single and double quotes. Unfortunately my text editor seems to already convert such quotes when I save, so any regular expression I make seems to get...
I'm using the Ajax Form jQuery plugin to get JSON from a server:
/**
* Helper function for the jQuery AJAX form plugin.
*/
function bindOnSuccess(form, callback) {
form.ajaxForm({
dataType: 'json',
success: function (response, status, xhr, $form) {
callback(response);
}
});
}
Usage:
bindO...
I was browsing the JIT's code, and I saw this:
var isGraph = ($type(json) == 'array');
var ans = new Graph(this.graphOptions);
if(!isGraph)
//make tree
(function (ans, json) {
ans.addNode(json);
for(var i=0, ch = json.children; i<ch.length; i++) {
ans.addAdjacence(json,...
Possible Duplicate:
JavaScript: Why the anonymous function wrapper?
Sometimes I see a structure like this in JS programs:
(function() {
// blah blah
})();
Any ideas what's this doing and what are its side-effects and benefits?
...
I have an html link that has uses hover() (well, the hoverIntent plugin...but same difference) to trigger a div to slidedown (I animate the CSS top attribute).
This all works and looks perfectly, except that when the mouse moves off of the hyperlink and onto the div that contains the menu links, it immediately triggers the mouseleave e...
Hi
Is anybody knows how to set width of the grid in percentage?
for example
but in the page the width of grid is more than 2000 pixels. It does not get adjusted to page width.
Any help...
Hi, I'm a full on newbie at programming. I know what I'd like to do, and believe I have the code I need, but I don't know how to get everything hooked up.
I have this link:
<%= link_to 'Start monitoring this
room', start_robot_path(@robot),
:style => "color:green;" %>
When it is clicked/pressed, I would like this javascript co...
I am attempting to create a simple comment reply to posts on a forum using the AJAX function in jQuery. The code is as follows:
$.ajax({type:"POST", url:"./pages/submit.php", data:"comment="+ textarea +"& thread="+ currentId, cache:false, timeout:10000,
success: function(msg) {
// Request has been successfully su...
I am trying to do something really simple - initialize an array in Javascript. And it's not working in Google Chrome. Here is the code:
status = [];
for(i=0; i < 8; i++)
status[i]=false;
alert(status.length); //It says 0 when it should say 8
What gives?
...
I have a large list of instructions that I need executed sequentially but slowly. One every ten milliseconds or so. I'm thinking about a queue type data structure but am unsure how to proceed.
...
I'm using the Google AJAX Feed API to search for a RSS feed. It works when I just run the javascript in the head of my HTML document in EXAMPLE 1 below (I know I'm getting no result, but that's a problem for another day!), but I need to actually run it when everything's loaded. I'm using jquery, so I've got a $(window).load(function(){})...
Hi all, two question for you:
reading google documentation i've make an html with the JS for make a google maps api call.
I've put this file in my project, and in a TABView i read and render this file in a uiwebview.
Works great but every time i start my app and go to this view i got this message: "appleweb://someID want to use your cur...
I am using below code to delete HTML Table row using javascript but its giving me error.
using below code i am creating a column at run time using javascript which contains delete Anchor tag.
var tbody = document.getElementById("<%= tblcriteria.ClientID %>").getElementsByTagName("TBODY")[0];
var row = document.createElemen...
Problem/Issue descritpion:
The javascript file is not updated properly in prod server enivironment, but we deployed the same EAR in dev server where the file is updated and works properly. we also cleared both client & server caches
...