I am trying to get the text inside a specific div in a server response. I used Firebug to see what the response was, and I can see my element in the returned code, but for some reason I can get jQuery to capture it. Here is what I am using:
var response = $('<div />').html(serverData);
$('#uploadedFiles').html($(response).find("#creat...
I am using the jquery validation and i need to validate an email.
I use
$("#myForm").validate({
rules:
email: {
required: true,
email: true
}
})
SO FAR so good. The problem is that i need to make an ajax call to verify if given email already exist.If exist display message "This email already exits....
I can't seem to make this work. I'm accessing this method from a seperate .js file.
function TabLoaderAJAX(xurl, xdata) {
var result = null;
$.ajax({
type: 'POST',
url: '/services/TabLoader.asmx/' + xurl,
data: xdata,
contentType: 'application/json; charset=utf-8',
dataType: 'json',
...
I am using the $.grep() function http://docs.jquery.com/Utilities/jQuery.grep
$.each($.grep( [0,1,2], function(n,i){
return n > 1;
}),
function(){ alert(items matched); // do something }
);
How to alert the no. of items that were matched in the alert box? Also how to avoid checking the count on each loop?
...
I am looking for a good plugin to add/remove a set of form fields in a page.
Like this one http://vipullimbachiya.com/jQuery/Plugins/MultiField/SampleMultiField.htm#example .
This plugin can do what I want but am trying to find out if there is any better option available. I have seen one excellent plugin some time back but lost the u...
I have some HTML code like this:
<div style="background:red;width:900px;height:200px" id="wrap">
<div id="inner" style="width:300px;float:left">
...
</div>
</div>
I need to:
1) Remove "styles" attribute and maybe some others
2) Leave only "id" attribute
4) Get resulting HTML as a string
5) All of this without affect...
How do I always select the first item in a HTML select box using index? I do not want to use val() to select.
...
I have two connectedSortable lists and when I move the items between each list, I want to change the prefix text of the item. Eg. If I move List 1: Item 1 to List 2, it would be rename List 2: Item 1 once it has been moved across to the new list.
Greatly appreciate any help on this one, cheers
...
I load everything on my page.
At the end, I have this script.
<script type="text/javascript">loadNewVideo('u1zgFlCw8Aw',0)</script>
It doesn't work.
But if I substitute it with this, it works.:
<input type="submit" onclick="loadNewVideo('u1zgFlCw8Aw',0);" >
In the .JS file, this is the function:
function loadNewVideo(id, startSeco...
I have the following code:
var inp = $("#txt");
if(inp.val() != "")
// do something
Is there any other way to check for empty textbox using the variable 'inp'
...
I have 2 sortable lists. The first one is getting the elements with AJAX from database (like pagination, I do not want 200 item at once on that list). The second one is empty at first and I want to fill it with elements from the first.
I'm very new to jQuery and AJAX so I want to apologize in advance for any stupid thing that I will say...
I want to ask user whether he really want to leave the page or not, when he clicks the close button just like it done in google docs. How to do that using jquery?
...
$("select").change(function() {
alert($("select option:selected").val());
});
OR
$("select").change(function() {
alert($(this).attr("value"));
});
I am specifically looking at the selector used in the alert. From my
testing the result in the same correct values to be displayed...
Hi
I have a jquery simple modal with a textbox and linkbutton on when the link button click event is fired and I try to get the textbox's value in the code behind it is empty
Any ideas?
...
I have a div called "#top". I would like it to fade out when the mouse is idle for 3 seconds. When the mouse moves again, make it appear (fade, of course)
Does anyone know how to do this?
Thanks a lot.
...
Hi All,
I have received a new design for a website and in the design the designer used jquery. I'm implementing the design no into an ASP.NET Ajax application.
But I ran into a problem. I have a page with an update panel and a menu. When a menu item is clicked a user control is loaded dynamically into a placeholder on the update panel....
Basically I am hacking a foxycart setup I run and I need to basically hide a certain shipping option should a few things on the page exist...
1) that $value != United States (this is pulled dynamically from a text input but for purposes of showing you I've made it a static variable here
2) the number '.fc_cart_item' occurs is only once...
<td width="162"><span class="required">*</span> Name:</td>
<td width="407">
<label>
<input id="store_name" class="text_field alnum" type="text" minlength="3"
maxlength="30" size="40" name="store_name" style="color: rgb(51, 51, 51);"/>
</label>
</td>
<td class="char_count_area" style="color: green;"/>
I have some...
I want to validate start date and end date.For this purpose in jquery datepicker, i want to deselect or disable the previous date from the selected start date.Any body knows please help me
...
Since Apache Struts has deprecated Dojo plugin from Struts 2.1.x I am thinking to change everything to jQuery. I especially noticed the difference in sizes (170kb vs 19kb - something like that). I had troubles with IE browser with handling dojo scripts, is this happening also with jQuery (when user is working with the application for a l...