Hi Folks,
Javascript (ECMAscript) supports the Array.prototype.forEach method since version 1.6 (ECMAscript edition 3, 2005). So quite a lot of browser already support that method and it's incredibly fast in comparison to jQuery's $.each() method for instance.
(Actually it beats all implementations, regardless which Javascript library)
...
I have a setup with multiple form fields..
<input type='text' id='Trait1' >0</input>
<input type='text' id='Trait2' >1</input>
<input type='text' id='Trait3' >2</input>
<input type='text' id='Trait4' >3</input>
(data used is just for example)
When I use
$.JSON.Stringify(form.serializeArray());
I get something like..
[{'name','Tr...
Hello,
Here is my code within (document).ready
$('.checkfirst').click(function() {
if ($(".textbox").is('.required')) {
var x = $(this).offset().top - 200;
$(this).focus();
$('html,body').animate({
scrollTop: x
}, 500);
divHint = '<div class="formHint">This is required!</div>';
...
I saw in one of the jQuery books where you can highlight a column that's being sorted.
$('th.sortable').click(function() {
var $th = $(this);
var column = $th.index();
var $table = $th.closest('table');
var rows = $table.find('tr:not(:has(th))').get();
Q: How do I add the 'hightlight' class to every cell in the column ...
I have written a jquery script here
But there is problem in the $(this).toggleClass("active").next(); section. With this all the header tags will be in "active" class. How can I assign "active" class only for clicked tag?
Thanks in advance
...
hi very good,
I want to summarize what I send the image, ie the input file, does not reach the addimagen.php file, and sure it's a javascript problem, because with php alone, if you do it right.
I would like to know because I sent all the information I have the form, I have been doing some checks and not sending me and why it shows me ...
I'm trying to get a certain fieldset to show up in a dialog box (using facebox) .. I've got the button set up, the dialog box and the HTML as a partial that I call .. The only thing is I don't know how to call the partial inside the jQuery..
Here is the jQuery:
$('#addCatbutton').click(function() {
jQuery.facebox('Add Ca...
Can someone explain the differences in simple terms?
...
Is there any existing jQuery functionality that can test if characters entered into a textbox are either numeric, or valid in a number?
Such as
.00 or 0.00, but not 0.00.00 or 0a
What I'd like to do is catch any invalid characters before they appear in the textbox.
If it's not possible with jQuery, what's the best way to approach thi...
Is it possible to force an error state to return to an ajax request from a php script.
I am handling the success and error states in an ajax request and i want a way to force the error. The error only seems to be triggered b y xhttp error and i want to trigger this when a condition is not met at the server. Its seems confusing to have...
hello Friends,
Can any one provide me a good tutorial about to implement spell checker?
that is I have a textarea and one button.. what ever I enterd in to the textarea i need to do the spellchecking on that..
thanks
Thanks
...
Hi,
I have found that if I am using jQuery masonry and also use jQuery to set the opacity of something, the opacity does not work in IE. The funny thing is that I have a div set to fadeIn, which also has an opacity value. The div IS translucent when fading in IE, but as soon as the fade has finished it just becomes solid. This is very s...
I have a search page.
On clicking search it will show a jquery modal with processing image and redirect to results page.
I have download functionality also in the search page.If i select download option,
the result may vary to 1 kb to 25 mb , and i cant put a timer to close the modal window.
Is there any way to find the download is...
How to replace "i" in <li>anything</li> using regex
Code :
var code = "<li>anything</li>"; // i don't know what is in <li>......</li>
result should be :
var code = "<li>anyth1ng</li>"; // i don't know what is in <li>......</li>
...
Code:
$('#Inputfield').keyup(function(e)
{
if(e.which == 13)
{
functionXyz();
}
else
{
functionZyx();
}
});
$(document).keyup(function(exit) {
if (exit.keyCode == 27) { functionZzy(); }
});
Question:...
I have a list of links wich point to html pages.
<ul id="item-list">
<li><a href="assets/data/item1.html">Item 1</a></li>
<li><a href="assets/data/item2.html">Item 2</a></li>
<li><a href="assets/data/item3.html">Item 3</a></li>
<li><a href="assets/data/item3.html">Item 4</a></li>
</ul>
And i have a javascript(jquery) ...
Hi
I am using the following jQuery to change classes on elements in an unordered list. It doesn't seem like it is the most effective way of achieving the effect. Is there a better way to write this?
$(function() {
$('nav li a').click( function() {
$(this).parent().siblings().children().removeClass('active');
$(thi...
In a master / detail scenario, I use an Edit ActionLink that fetches the partial details view via a jQuery Ajax call; pretty typical, right?
The problem I've come across is when a user's auth token expires and he clicks on the Edit ActionLink. The returnUrl parameter of the LogOn action is being set by the ActionLink that returns the p...
i have a div:
<div id="div"></div>
with
$("#div").append("<div id='c'></div>")
$("#c").length
returns 0. what i can do for find the div width id = c after inserted in div #div?
thanks
...
<script type="text/javascript">
// check the spelling on a textarea
$("#check-textarea").click(function (e) {
e.preventDefault();
$(".loading").show();
$("#text-content")
.spellChecker({
lang: "en",
engine: "google",
suggestBox...