What is best practise for polling server with JavaScript for application that needs to refresh data very rapidly? I'm using jQuery for front-end and Java Spring Framework for backend.
Example of refreshed data could be list of items that are getting updated very rapidly (every 1 second).
...
Hi,
I try to get the exact used Height of a div element. It should be .outerHeight() but this does not work if the last child of the div has a border bottom.
I did a little example:
Html:
<div id="iWantThisHeight" class="box">
<div id="div1" style="">innerDiv1</div>
<div id="div2" style="">innerDiv2</div>
</div>
Css:
.box div{
...
I have a range of parameters that are passed via jQuery Ajax to an MVC JsonResult action. For the most part, these arrive successfully, but there is a Date value that is not arriving at all.
What considerations / formats do I need to use - or what approaches do I need to take - in order to get this date to arrive successfully?
...othe...
I want to wrap the following code into a function using jQuery and call that function from inline (eg: onclick, onchange etc.).
function some_function() {
alert("Hello world");
}
Called by (example):
<input type="button" id="message" onclick="some_function()" />
This question is simple for a reason. I can't seem to find a prop...
I want to select an html element with jquery using its attribute value.
I use $('td[i=0]') and it works correctly. What if i want to use 2 attribute together.
For example, I want to select td element with attributes i="0" and j="2" .
...
Hi,
is it possible to sort div by using the data function?
html
<div id="gp_21" class="line">one</div>
<div id="gp_35" class="line">two</div>
<div id="gp_11" class="line">three</div>
<div id="gp_29" class="line">four</div>
<hr />
<div id="check"></div>
js
$(document).ready(function rt() {
$('#gp_21').data("rtt", { age: '25135...
Table:
<table id='t1' style='border:1px solid #000000'>
<tr>
<td><span id='flight_1'>1</span></td><td>1</td>
</tr>
<tr>
<td><span id='flight_2'>2</span></td><td>2</td>
</tr>
<tr>
<td><span id='flight_99'>99</span></td><td>99</td>
</tr>
</table>
I want to search for each 'flight_xx' id ...
Recently came across the HoverIntent plugin for jQuery. It acts like a regular mouseover or hover observer, but waits to fire the action until/if the mouse slows down or rests. With tuning, it makes for interfaces that feel more human responsive.
The website I'd like to use it on is committed to a Prototype / Scriptaculous framework...
I have a 2 dropdown lists and when a user selects a certain option "a" in dropdown 1,then fields 1 and fields2 are to be filled in but then if changes this to option "b" on dropdown 1, then fields 1 should be blanked out.
At the moment my jQuery change handler on dropdown 1, has a set of jQuery sub calls ...
$("#bc [id$=_dpName]").cha...
I am using asp.net webforms; I want to submit a form and keep the button disabled until it gets saved to my database, exactly like Stackoverflow. Any suggestion?
protected void Lb_Save_Click(object sender, EventArgs e)
{
//disable my button
//Do a DB insert
//enable my button
}
EDIT:
I'll do a client-side validation fir...
I'm having some issues using the opacity effect on jQuery-UI tabs... especially in IE
Here is my code;
$('#featured').tabs({
fx:{
opacity: "toggle"
}
}).tabs('rotate', 5000, true);
Check out http://www.jsfiddle.net/cxNj8/4/
Apart from the effect...
Hello,
I have the following JSON:
{
"@id": "hey there",
"id": "hey there 2"
}
I can easily parse "id" with json.id but how can I get the value of "@id" using jquery's inbuilt JSON parser?
As calling "json.@id" is not correct.
Thanks
...
I'm trying to follow Bob Andrews css styling for a sticky footer, what I'm trying to do is place the silverlight control (the <object> tag) in the main content area with it's size filling all the available space. If you take a look at Bob's demo page, what I'm after is the silverlight control occupying all the yellow part.
What I suspe...
I am creating input boxes dynamically to capture inputs for a certain word (e.g. H E L L O for 'hello'). I want to set focus to the next input box after typing a single character in every input box. How should I do this?
<ui:repeat value="#{alphabets}" var="alphabet">
<h:inputText value="#{alphabet.value}"/>
</ui:repeat>
...
Can anyone better experienced then me, spot the issue here.
I'm unable to debug it, my var_dumps don't seem to get any effect due to the use of jquery.post() so I believe.
I get nothing displayed. I was expecting to receive a li series filled with json encoded values.
The HTML:
<div id='data'></div>
<form action="">
<input id="nome...
I want to use jQuery autocomplete when user enter @ in textbox for entering email address
when user enter @ afrer typing his email id domain name list like @gmail.com, hotmail.com, yahoo.com should be
populated so that user can select it instead of typing it from autocomplete.
I tried but it is not working
my code is
<!DOCTYPE ...
I have a list of draggable table cells that can be dropped onto a second table. They are set to clone, as the original table should remain unchanged if items are dragged from it.
Now I want to be able to move the dropped elements inside the second table from cell to cell. But if the Control key is pressed while dragging an element insid...
Any jquery tool for code identifier.i.e,the plugin should identify the language keywords for c,c++..
...
I am using Jquery AJAX to post a form on my page. I want to hide a div whilst AJAX is being performed and show it again when AJAX is a success.
How can I do this?? Check my code here:
$(document).ready(function(){
$("form#microblogpost").submit(function() {
// we want to store the values from the form input box, then send via ajax belo...
I use Jcrop plugin(Jquery) in my app. I decide to use some ajax solution but have a problem with passing value to function. I don't kno whether it is my lack od JavaScript skills or Jcrop issue.
Here is code
jQuery(window).load(function(){
jQuery('#cropbox').Jcrop({
onChange: showPreview,
on...