I am using qunit and jquery. Latest version of both.
In my code when I submit the form I have the event as e. I call
e.serializeArray()
Here is my test.
equals(args.data, [ { "name": "user_name", "value": "john" } ], 'input data');
And this is the error message from qunit.
expected: [ { "name": "user_name", "value": "david" } ] ...
I have a field and want to prevent some illegal characters while showing the user as he types.
How can I do this in follow example?
$('input').bind("change keyup", function() {
var val = $(this).attr("value");
/*
if (val --contains-- '"') {
$(this).css("background", "red");
val = val.replace('"', "");
...
Hi,
I have a <select> element which I need to track using change().
jQuery('.dropdown').change(function(){
yada, yada
});
Works perfectly on already created elements. However, if I dynamically create the <select>, it (obviously) doesn't work. Now, I'm stuck with jQuery 1.3.2 (long story), so if I use something like:
jQuery('.dro...
I am trying to activate the native hover effect of a div from another div. I understand that I could do this all in jQuery and add the styles in there, but would rather leave the native :hover in the CSS. I'm just wondering if there is a way for this to work:
$("#div1").live("mouseenter", function() {
$("#div2").trigger("mouseenter");...
How to add exception in this jquery code?
$(function() {
$("table tr:nth-child(even)").addClass("striped");
});
this code is applying on all tables.
but for specific pages i don't want strip effect.
I've different body id on each page.
I want to know how to add exception for a id.
$(function() {
$("table tr:n...
I've built a menu with Superfish v1.4.8. Everything is fine but I need to show menu item's hover state when mouse is over its drop-down items. In case I want "Ürünler" to be at its hover state when it's dropdown menu is open.
Site can be seen here.
...
I need a way of replacing the text contained within <a href="this text" using jQuery, I want to replace what ever text is held within quotes to a '#'.
Any suggestions?
...
Ok so I have created a plugin which has an unordered list of list items,
each list item has a class to identify it.
The plugin so far is able to get the unordered list in its entirety, but suppose i wanted to select 2 of the list items only which have classes associated to them. How would I accomplish this.
Here is my plugin, I tried u...
foreach (OrganizationUser OrgList in GetOrganizationId)
{
Organization Org = new Organization();
str.Append("<li class=selectlist-item style=display:list-item;>" + OrgList.Organization.vcr_OrganizationName);
str.Append("<Input Type=hidden name=Organization value=" + OrgList.Organization.int_Or...
I'm tring to practice table-less design, and I trying to get the following:
4 images per row, and under each image is the name of the image.
So my DOM:
<div id="images">
<div class="imageblock">
<div class="image"><a href=""><img src=""/></a></div>
<div class="meta">some filename</div>
</div>
<div ...
Hello guys,
I am a newbie to jQuery and stuff. But I have been using some of the plugins for a while. I had
used two very good plugins earlier.
Demo of the plugins:
plugin 1
plugin 2
I was trying to combine the above two plugins and was wanted to see if I could use the
functionalities of both in one image itself. But somehow I ...
I have the following jQuery code
$("#dropdown").hover(function() {
$(this).stop(true,true).fadeTo('fast',1);
$("#options").stop(true,true).slideDown();
}, function() {
$(this).delay(1000).stop(true,true).fadeTo('fast',0.1);
$("#options").delay(1000).stop(true,true).slideUp();
}
);
What I expec...
ok I have a <ul id="classname"></ul> can i insert '<li id="classname1"></li>' inside ul on form load using jquery ?
...
Hi,
I have a page with many panels. each panel will have around 5 textboxes.
I need to disable all the textboxes which are empty when the page is loaded. Want to acieve this using JQuery. Can somebody help me on this?
...
Hi,
Hoping to get some assistance but I am after a jQuery/PHP means of allowing a user to drag and drop files and then via PHP, upload one or more files to a specific directory on a Linux box.
I only have Firefox 3.6 as my base browser but can also move to FFox if need be.
Cann use any HTML5 features as long as I'm using Firefox 3.6
...
I am new(ish) to jQuery and am testing out the extraction of DOM element data using jQuery.
Below, detailed on the firebug console I tried to extract data 10 different ways (from 1- to 10-) using data returned directly from the ajax request (rtnData).
And then to compare, I wrapped (rtnData) in a div to make it a jQuery object, and sto...
I am using Jeditable plugin with jQuery. My issue I'm having is that it completes list tags and other HTML tags. (Yes I know that this is awesome and is a good feature, I don't have any issues with it, but what I need it for it can't complete html tags)
How can I make it stop auto completing my html tags?
Thanks
...
Currently I'm trying to make some sort of vertical auto-scrolling. This is my code
$(document).ready(function() {
var reachEnd = false;
var top = 0;
function animateMargin(){
if(top == -720){
reachEnd = true;
}
if(reachEnd == false){
$('#bslider').animate({'marginTop' : '-=240px'}, 500);
top -=240;
...
Currently I am working on a legacy web page that uses a ton of javascript, jquery, microsoft client javascript, and other libraries. The bottom line - I cannot rewrite the entire page from scratch as the business cannot justify it. So... it is what it is. Anyway, I need to pollute (I really tried not too) the global namespace with a v...
I have couple modal windows and I am trying to add "print this" functionality. I found a script and I am trying to modify this. He creates an iframe, loads the html, prints and then closes the frame. I am going to insert my ajax html response to that div. For some reason, my ajax response is not loading into the div that I want to print....