I'm using the jQuery Form plugin to submit AJAX requests. It's a simple contact from using this PHP script: http://pastie.org/725652 - the only validation happens inside the PHP.
Here's my Javascript code to trigger the whole thing:
$('#contactform').ajaxForm({
target: '#error',
beforeSubmit: function() {
$('#error').a...
I have an image, and using jQuery I've turned it into a button.
The so called button has two states: regular and pushed.
Using jQuery I detect a "mousedown" and "mouseup" and replace the "src" attribute, like so:
$("#btn").click(function() {
;//DO SOMETHING HERE WHEN PRESSED
});
$("#btn").mousedown(function() {
$(this).attr({ src...
Hi all,
There's got to be something I'm missing. I've tried using $.ajax() and $.post() to send a string to my ASP.NET MVC Controller, and while the Controller is being reached, the string is null when it gets there. So here is the post method I tried:
$.post("/Journal/SaveEntry", JSONstring);
And here is the ajax method I tried:
$....
Hi there, I am new to jquery and consider myself a very novice coder at best, so please bare with me. But I think I am in need of your help!
I have quite a long complicated php form, and a requirement to duplicate a set of fields. I am sure there must be a more efficient way of coding it, however I can't figure it out. There are 2 examp...
i want to make a login page but it is hidden in the center of the main page.
and then i use jquery to make the div that surrounds it visible and it will be like the login page at www.bytes.com.
but i cant figure it out how to center it with css. it doesnt work without affecting the main pages div positions.
i just want it to float ove...
I have created the layout for my new portfolio webpage here: http://vitaminjdesign.com/work.html
I want to have a legend with tags (ALL, logo design, marketing, web design, print design) and when these tags are clicked, the page filters the results and display them like they are currently displayed. At first, I want ALL projects displa...
Hey all,
I've got a bit of a jQuery problem. I've got multiple tables on a page that all have the same class but no ID. I'd like to be able to be able to get the first row from all of the tables back. Is there an easy way to do this?
This is what I've got so far:
$(.t13Standard tr:first')
But that only selects the first row from ...
The title pretty much says it all.
Using jQuery, I need to select all elements that do not have a background color or image defined, and apply at least a white background to it.
Thanks!
...
I have made a super simple test case of a problem I'm having with IE6 and jQuery 1.3.2
In IE6 I only see the first alert box, it will render the page but it seems there is something in the js file that is causing IE6 to stop processing the scripts in the <head> content and thus not show the 2nd alert box. Chrome works as expected.
Nee...
This is probably really easy, but I've never done it before. How do you change your cursor to the finger (like for clicking on links) instead of the regular pointer?
And how to do this with jQuery since that's what I'm using it for.
...
I've seen this done, but I can't find an example anymore. What I'd like is to switch a jQuery action... the code below is just an example, it is not the code I am using, I'm just trying to remember how this works.
var action = (getURL) ? "attr('href')" : "html()";
alert( "The result is" + $('#myLink')[action] );
I also tried
var ac...
Can I select two elements with Jquery at the one time?
For example I tried this but it only selected the first element:
$('.loginStaff' || '.loginClient').click(function(){
$('.login_form').toggle();
});
I also tried but this only selected the last element:
$('.loginStaff' && '.loginClient').click(function(){
$('.login_form').togg...
Our simplemodal alert div needs to be printable. The content itself should fit on the page fine in most cases, but I can't override the positioning in my print css to get it flush top/left for printing to avoid having the right side cut off.
It seems like I can change #simplemodal-container in my print css for everything but positioni...
How can I achieve this?
A user clicks the delete link (with a class of "confirm").
Confirmation message appears asking "Are you sure?" with "Yes" and "Cancel" options.
If yes is selected, the link continues as clicked, but if cancel is selected, the action is canceled.
Update: Final working code with confirm() thanks to this guy:
$...
Hello,
Here's my problem:
I have a div element that when it's clicked, another div shows up. Now I have no idea how to make that wherever I click on the page, this div gets removed. I mean, I know how to remove it, but which kind of events should I have in consideration to do such thing!? I can't make it with focus/blur can I. I mean I...
I have various simple ASP.NET MVC views for CRUD operations which work fine on their own as a simple webpage. I will now integrate them into the website itself (into the content) and have for instance links like "Create new post" which would fire up the view in a chosen Lightbox clone (don't know yet which one, maybe Colorbox or Thickbox...
Hello, I'm using Jquery plugin DropShadow:
web site
And I want to set drop shadow color manually.
Color is specified in the usual
manner, with a color name or hex
value. The color parameter does not
apply with transparent images.
From documentation, so, here is my code:
{
...
color: "black",
swap: false
}
I...
I have a Javascript object which has a jquery ajax call to server to fill one of its attributes:
function Busqueda(contenedor){
var datosPost = "someData";
var resultados = undefined;
var that = this;
this.buscar = function(){
jQuery.ajax({
type: "POST",
dataType: "json",
ur...
Hello-
I am using a filter script and I am trying to alter the jquery a bit.
(see demo here: http://www.askthecssguy.com/2009/03/checkbox%5Ffilters%5Fwith%5Fjquery%5F1.html)
Now that you've seen the demo, you know that once you uncheck a box, it filters out the results with those tags in it. For instance if you deselect the "wordpres...
I have a link that I would like to present with a confirmation. I am using the javascript confirm() method. But the only way for me to get the link to not work when the user clicks 'cancel' is to use return false;. Is that the correct way to do it (cross-browser)?
$('a.confirm').click(function() {
if(confirm('Are you sure? This cann...