jquery

jQuery mouseover issues

Hey everyone, I have image, and on mouse over it fades in two arrows (on the left and right sides), then on mouseout it fades those arrows out. My problem is that when the user hovers over the arrows, the image considers it a mouseout (since the arrows float above the image), and fades the arrows out, causing an infinate loop of fading...

How do I force Firefox to redraw a video element?

I'm developing a dynamic html pop-up window (an absolute positioned div) using jQuery that automatically centers itself on the screen. It can also accommodate content that fits or exceeds the dimensions of the window screen. The idea is that our customer clicks a "read more" link next to our product listing and then this pop-up window c...

How do I animate a background color to transparent in jQuery?

I can animate from transparent to color, but when I tell jquery to animate the backgroundColor: 'transparent' it just changes to white. Any idea how to fix this? ...

How to avoid flickering effect with javascript drag and drop.

I use the following javascript (with jQuery) to handle drag and drop on a script I am writing: jsc.ui.dragging = false; jsc.ui.drag_element = {}; $(".drag-target").mousedown(function() { jsc.ui.drag_element = $(this); jsc.ui.dragging = true; }); $("html").mousemove(function(e) { if(jsc.ui.dragging) { jsc.ui.drag_element.css({"posi...

Firing the JQuery Dialog using an ASP.NET Button?

I have a Page which has a Control on it with 2 textboxes (username and password) and an asp:Button. If the user's membership is going to exipre within 30 days and the button is clicked, I want the JQuery dialog to popup. Inside the JQuery dialog, I have some text and an asp:LinkButton. The link button has an event attached to it, but ...

C# Web Service won't output JSON, only XML

I'm trying to use jQuery and JSON with a C# Web Service that I wrote. No matter what, the following code will only output in XML. Webservice Code [WebMethod] [ScriptMethod(ResponseFormat = ResponseFormat.Json)] public string HelloWorld() { return "Hello World!"; } I also have these attributes assigned to the class [WebServiceBin...

jquery unbinding events speed increases

I have a big content slideshow kinda page that I'm making that is starting to use a lot of event triggers. Also about half of them use the livequery plugin. Will I see speed increases by unloading these events between slides so only the active slide has bound events? Also is the native livequery significantly faster then the livequery...

rules/attr in jQuery validation

I'm trying to add custom validation to a dynamically created control. Can I use .attr() to set a rule for a control? $.fn.addValidationExpression = function(field) { if (field.ValidationExpression != null) { $("#fld"+getFieldIdSuffix(field)).attr("validateExpression", field.ValidationExpression); } return this; }...

How to call a client-side method from an asp.net method?

I have the following javascript: <script type="text/javascript"> function showjQueryDialog() { $("#dialog").dialog("open"); } $(document).ready(function() { $("#dialog").dialog({ autoOpen: false, modal: true, buttons: { "Renew Membership": function() { $(this).dialog("close")...

Weird jQuery behavior - slide()

Hey, if you go to this page and hit one of the left dropdowns - http://ryancoughlin.com/hp/index.php?c=about - it almost looks like it is glitching/bumping, once it gets to the bottom or rides back up top. Is it possible to fix this? Or is this how it behaves in jQuery? Thanks a ton, Ryan CODE: $(".menu-header").click(function() { ...

JQuery sorting a table without the plugin

Is there a jquery function to sort a table. I am aware of the JQuery Tablesorter plugin but I want to avoid using it if possible. As a FYI - The table that I have a header with custom images to indicate ascending and descending. The data type could be pretty much any type. EDIT:Can I do sorting of a table in Javascript? ...

Scrolling a jQuery animation backwards and forwards

I am making a futsal (indoor soccer) coaching application which allows a coach to add players on the screen, set their movement direction (by drawing arrows using HTML5 canvas), and then press 'play' to move all players on the screen. A player is made up of a div with a background image of a player. Animation is being done by using jque...

how do I show n json items every x seconds using jquery?

I have a json object 'items' which has few items that I want to show 2 of them every 2 seconds. How would I do that? so, it displays items in division1 every few seconds instead of showing all at once. Eg. get all items every 5 seconds and show 4 items every second for 20 items. <table id="division1" > <thead> <th>Name</th> ...

Comma notation in jQuery?

So I've taken a look at this some comma notation in this tutorial using jQuery. The link is here: http://jqueryfordesigners.com/coda-popup-bubbles/. After looking at all the selectors on the jQuery site, I can't seem to find out what this ', this' notation represents. Any answers? Here's a quick snippet: var popup = $(popup, this).cs...

Best practice for sending AJAX data via form - retrieving value back

I have a small form where I want the values to be updated on change for my select boxes which can be done with: $("form#updateclient select").change(function(){ // use one selector for all 3 selects $.post("inc/process-update.php",{ // data to send completed: $("select#completed").val(), hours: $("select#hours").val(), upda...

How to initiate another jQuery .ajax call based on the result from an initial .ajax call?

I have a jQuery .ajax call: $j.ajax({ type: "POST", url: "/Services/Cart.asmx/UpdateQuantity", data: data, contentType: "application/json; charset=utf-8", dataType: "json", success: function(msg) { var d = msg.d; // etc. }, error: function(xhr, ...

Fire event after all Javascript has finished executing

I have a page that uses a lot of javascript calculations when the page loads. This can lock the page up for a few minutes depending on how many calculations are performed. I can open a jquery modal box on page load. The calculation functions then fire and then then once they are finished they modal box should close. The problem the bo...

Exclude an Item from an addelement

hello, How can I exclude a certain input box from adding an element? $('div#tabs input[type="text"], select option:selected, input:checked, textarea').addClass('takethis'); I wnat this for all input boxes and select boxes except for on certain input box. How would i do this? ...

jQuery code in plain Javascript

How can I write this jQuery code in plain Javascript? I can't use jQuery where this is going to be used. $(function(){ $("td#dark[height='260']").append("<a href='http://www.website.com'&gt;&lt;/a&gt;"); }); ...

How to not submit a form if validation is false

How can I make sure the form won't submit if one of the validations is false? $('#form').submit(function(){ validateForm1(); validateForm(document.forms['dpart2']); validateForm(document.forms['dpart3']); }); ...