Hi,
is it better to do this (regarding performance, not readability...):
$('a.updateCartButton').click(function() {
$('form[name=updateCartForm]').attr('action', $(this).attr('href') + '#' + $('img[id^=iconUpdateArticle]').attr('id')).submit();
return false;
});
or this:
$('a.updateCartButton').click(function() {
var actionHre...
I am using jQuery and jQuery.validate plugin to validate ASP.NET pages, since I found jQuery Validation plugin better than ASP.NET validation controls.
I have used This validation code for Login and simultaneously for other pages like register and many others.
//.NET code
Dim jsValidate As String = String.Format("Validators.validateLo...
Hi all,
I was wondering if anyone can post an example of how to get aselected radio button option from an asp.net radio button list control via jquery on the loading of a page.
Thanks
...
Hi,
the other day I read this article by Alan Storm called "Using jQuery and the Object Literal Singleton/Module Pattern".
Now I'm wondering if any of you are writing jQuery code using the object literal notation a lot? I'd be happy to check some code examples and/or get advise on when it actually makes sense to use this notation.
Tha...
I have this code:
$.getJSON("Featured/getEvents",
function(data){
$.each(data.events, function(i,event){
var title = event.title.substr(0,20);
$("#title-"+i).text("Text");
if ( i == 4 ) return false;
});
});
I am doing this in conjucti...
I am trying to use FormCheck for MooTools to validate a basic contact form I am planning to build. The problem is I can't seem to set up the script to work at all =(
If anyone knows about FormCheck or MooTools and can add any pointers they would all be greatly recieved.
My page: http://is.gd/1p1Ys
Thanks
Ryan
...
I'm currently building a single page AJAX application. It's a large "sign-up form" that's been built as a multi-step wizard with multiple branches and different verbiage based on what choices the user makes. At the end of the form is an editable review page. Once the user submits the form, it sends a rather large email to us, and a small...
I want to write my own rich text editor with javascript or jquery. I don't know where to start, so as bare bones as possible is ideal.
EDIT: To response to the comment about reinventing the wheel - the reason why I want to this is because 1] some features I want to implement aren't available even in TinyMCE. 2] I have an idea to upgrade...
I'm trying to build a jQuery function that will allow me to produce a TinyURL from some other link for micro blogging reasons (yes, twitter)... I found this tutorial from James Padolsey, but am not getting a response back from the call.
http://james.padolsey.com/javascript/create-a-tinyurl-with-jsonp/
function requestShortURL(longURL,...
The Project
I've been asked to work on an interesting project -- what amounts to a basic Web CMS -- that uses HTML/CSS/jQuery with PHP. However, one requirement is that there won't be a database to house the data (they want flat files for the documents/pages -- preferable in JSON format).
In a very basic sense, it'll be used to genera...
Hi all,
I'm trying to understand why
$('#title').replaceWith('ha');
will work outside the
drop: function(event, ui) {}
area in jquery's droppable script, but it won't work inside. Specifically, if I do
$(".droppable").droppable({
drop: function(event, ui) {
$('#title').replaceWith('ha');
}
I get a Runtime Error (line ...
I am having issues with loading external javascript using JQuery. Every time when I try to load this external file, browser window becomes blank and in Firefox it redirects to something like:
wyciwyg://40/http://mydomain.com/myfile.html
What I am trying to do, is to load walkscore google map into one of div's on the page. I've tried u...
I want to have the JQuery Datepicker open when the user clicks on an image. There is no input field where the selected date appears afterwards; I'm just going to save the entered date to the server via Ajax.
Currently I have this code:
<img src='someimage.gif' id="datepicker" />
$(document).ready(function() {
$("#datepicker").date...
I'm rusty with delegates and closures in JavaScript, and think I came across a situation where I'd like to try to use one or both.
I have a web app that behaves a lot like a forms app, with fields hitting a server to change data on every onBlur or onChange (depending on the form element). I use ASP.NET 3.5's Web Services and jQuery to d...
Having a problem with the jquery-1.3.2.js file and the fullcalendar plugin with ie 6 - 8 i get Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Trident/4.0; GTB6; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; InfoPath.2; .NET CLR 3.5.30729; .NET CLR 3.0.30729)
Timestamp: Fri, 10 ...
I've been writing some jQuery functions that have JavaScript variables and looping, etc inside them - they're becoming long and hard to read. If I want to break them up, how would I do that?
$(".x").click(function ()
{
var i=0;
for (i=0;i<50;i++)
{
if ($("#x"+i).is(':hidden'))
{
$("#x"...
not sure how to edit but could not make the code visible.
...
I want to select only the elements on the first "level".
Ex:
<div id="BaseElement">
<p>My paragraph 0</p>
<div>
<span>My Span 0</span>
<span>My Span 1</span>
</div>
<span>MySpan 2</span>
<span>MySpan 3</span>
<p>My paragraph 1</p>
</div>
Let's say that you got the BaseElement node.
var Element = $("div#BaseElemen...
This code attempts to dynamically switch the class of the StateContainer div from StateOne to StateTwo to alternate the visibility of the DIV.
When I run it, I always see the following both before and after clicking the button.
Visible first
Visible first
Visible first
Visible first
Would appreciate any suggestions for why this code ...
Hello,
I was wondering how I can slideToggle a table row from my script.
I have a php file that is included in an html page inside a div called 'output-listings'.
PHP FILE:
<?php
function outputListingsTable()
{
$mysql = new mysqli('localhost', 'root', 'root', 'ajax_demo') or die('you\'re dead');
$result = $mysql->query("SE...