I have a form on which I use validation. This form has a section for photo upload. Initially this section contains six elements with the following code:
<img class="photo_upload" src="image/app/photo_upload.jpg">
I have bound a function to the click event for the class of photo_upload. This function replaces the image with a minimal ...
How to get all id's of input elements inside a form in an array?
...
Could anyone tell me why 'function()' right after .ready is needed to make the script work?
<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("button").click(function(){
$("p").hide();
});
});
</script>
</head>
<body>
<h2>This is a heading</h2>...
Hi, I'm currently developing an ajax application and I'm looking for a feature that lets me intercept all static and dynamic links using javascript. The links look like these:
<a href="link1/">link 1</a>
<a href="link2/">link 2</a>
etc.
I then want the browser to redirect to: current.page/#link1/ rather than current.page/link1/. I'm u...
I'm using $(this).attr("href"); to select the href attribute value of the clicked element, but I need to select only the part after the last '=' symbol.
Example:
href="index.php?con=123&id=123&sel=heyhey"
I only need the last part of the href that is 'heyhey'
How can I select this??
...
I'm using jQuery treeview plugin to populate a child treeview once click a folder node to expand. but $("#tv").treeview({url: webservice/webmethod}); but doesn't work, and failed to call webthod. How to make it?
Thanks.
...
I want to add to this simple file ... When you click on a tab updated contents of the page or reload
$(function(){
$('#tabsSlide #nav li a').click(function(){
var currentNum = $(this).attr('id').slice(-1);
$('#tabsSlide #nav li a').removeClass('current');
$(this).addClass('current');
$('#ta...
Using jQuery and the Cycle plugin. Runs flawless in Safari, Chrome, Firefox, and the latest version of Opera. Won't run in older versions of Opera, and of course, IE. I know its running Java, because its picking up the rollovers.
This is driving me batty. Hopefully its something simple. Here's the code...
$(document).ready(function() {...
I'm creating jQuery plugins using the pattern from the Plugins Authoring page:
(function($) {
$.fn.myPlugin = function(settings) {
var config = {'foo': 'bar'};
if (settings) $.extend(config, settings);
this.each(function() {
// element-specific code here
});
return this;
};
})(jQuery);
My c...
Hi All,
I'm hoping someone can help me with this as I'm at a loss. I'm trying to simply load a plain text file into a page at runtime using jquery- everything works fine in IE8 (8.0.7600.16385), Firefox 3.6.3, however in Google Chrome 5.0.375.55 the "data" comes back as nothing- i get an empty alert box.
This is the code i'm using;
<...
(submit said I was trying to post an image so I've changed image everywhere to <img>
I am trying to get jQuery to replace an <img> inside a datalist. The original <img> is the thumbnail image of a product on a category page. The small <img> I am clicking on are swatch images for the different colors of a product. I can get it to work usi...
I'm asking this question because I think it's one that we run into from time to time. I needed to take an HTML table that had been manipulated client side and send the resulting table data to the server for processing. Additionally, I wanted to map this using JSON.NET directly to my business object(s).
...
Hi all, question:
<script type="text/javascript">
$(document).ready(function() {
$(".module .caption").hide();
$(".module").hover(function() {
$(this).find(".caption").slideDown();
},function() {
$(this).find(".caption").slideUp();
});
});
</script>
This snippet works great for my purposes, the only caveat is...
Hello friends I am using this code in my view..
Using this code I am disabling the fields when the view loads.. like this my view displyas for number of users which I am going to selct using this below code I am able to disable only first Fiedset not for other fieldsets?
why its happening? I need to disable for how many users I select....
hey all
i am trying to aggregate form elements into object and then send it via ajax here is the code that i start using but i cant figure out how to do the rest
$('.jcart').live('submit', function() {
});
Update 1:
html form
http://pasite.org/code/572
Update 2:
I have successfully submit the form using ajax but it still refres...
Can anyone explain what the jquery documentation is exactly referring to with this statement: "the argument to write failsafe jQuery code using the $ alias, without relying on the global alias" when referring to using the following:
jQuery(function($) {
});
I have been using jquery for a while now so understand what this code is ...
$('fieldset').not('#Pchk input[type=checkbox]').find("input,select,textarea").attr('disabled','disabled');
Pchk is the id of my input checkbox
and even i did this code to its not working out for me..
$('fieldset').not(':checkbox').find("input,select,textarea").attr('disabled','disabled');
if I use this code its disabling even my c...
Hello! I am very new to jQuery and javascript programming. I have a program below that checks whether username is taken or not. For now, the PHP script always returns
if(isset($_POST["username"]) )//&& isset($_POST["checking"]))
{
$xml="<register><message>Available</message></register>";
echo $xml;
}
Login f...
There are several elements that are selected by $(".foo"). $(".foo").text() returns the text of each element concatenated together. I just want the text of one element. What is the best way to do this?
$(".foo")[0].text() fails.
UPDATE: I meant the . class selector, not #. Corrected.
...
Hi all,
In my local machine i have a scaffold that uses Jquery Validation plugin for the field's validation.
Now i want to add that to a fbml facebook application, but i'm haven't been able to load the jquery javascript and the jquery Validation plugin into the app, does anybody now how to do that? or maybe someone could suggest me a ...