jquery

jQuery Chaining/Efficiency Advice

Ok, before you review the code below, I know that it is AWFUL. It's redundant and bloated and I am not asking for anyone to fix it :) I am wondering what I need to study in order to fix it on my own. I'm working on a small project for my daughter, an interactive multiplication table that she can view in Mobile Safari. I want to highlig...

type submit vs type button

I have a button which right now is set as a type "submit". This calls the controller, execute some code and returns back to the view. When I use jquery to hide the button, I see that when I click on the button, what I have hides the button but as soon as the view is returned, the button is not hidden no more. Whereas with type "button", ...

Detect when a flash object is fully loaded

I've looked around on SO on this topic like this topic here. Also this one. But for one I'm not using a YouTube flash object and also I'm not using an image. Below is a simple AJAX request which retrieves data to populate a table. $(document).ready(onDocumentReady); function onDocumentReady(){ $('#Recorded').addClass('bor...

ASP MVC 2 Files

In controller, i create file. and invoke it by jquery.post. i understand that return file to view is impossible because of ajax. so i create file on disk, and return url of file to user. i think its not best way, but. my probleb now, is to know when user downloaded file, and delete it, how can i do it? or any others good ways to handle? ...

jQuery Ajax Status

In my jquery admin application I quite often get ajax status lingering, there are no errors thrown in the scripts which would half the flow of execution.. I only want to show the bar when there are active ajax requests: Here is the code: $('#AjaxStatus').ajaxStart(function () { $(this).slideUp('fast').delay(1000).slideDown('fast'); ...

How close can we get to this Flash effect without using Flash?

Please take a look at the Cheese & Burger website. More accurately, take a look at the slider down the bottom's relationship with the flip panels above. I know I could skin jQuery UI Slider to do the slider relatively easy enough. I'm more concerned on how close you can get to the flip effect without resorting to Flash. I don't want t...

jQuery's delegate conflict with another delegate in IE

It seems that in IE, some delegates may somehow cause another delegate to fail to work. This is one possible case: <html> <head> <script src='jquery-1.4.2.min.js'></script> <script> $(function() { $('#main') .delegate('div', 'click', function() { alert('on div!'); }) .delegate('[name=first]', 'change', func...

JavaScript/jQuery - "Array" of Arguments - Possible?

Hi Guys, Doing some client-side JavaScript development, which requires me to call a client-side API which only accepts one parameter at a time (cough, cough, facebook). Basically i need to call an API method twice: someFBApi.requestPerms('email') someFBApi.requestPerms('publish_stream') Now, i have a wrapper function for this call w...

jQuery: undo things when history:back?

hey guys, i know this question might be too easy, but i have no idea how to solve this. when submitting a form i'll fadeIn a Loading-Image. When submitting the form was a success the page redirects blabla... Now when I hit the BACK Button in my browser and i visit the previous page with the form the Loading-Image is still shown. How ...

fadeout effect with hide in jquery..

I am trying to hide a div with a fadeout effect but it doesn't seem to work.. $('#messageDiv').hide().fadeOut('slow'); Any suggestion. I am showing an error div using a custom function? function getErrorMsgStyle(txt) { return "<table width='100%' border='0' cellpadding='0' cellspacing='0' align='center'><tr style='line-height:7px...

calling jquery plugin function from html returned by an ajax call

Hi guys, Can anyone tell me, can I invoke third party jquery funcation from html return by ajax call please ? The problem I am facing is, there is an ajax call, returning some chunk of html (html for jquery datatable). In this html there is one link to add a new row to the table when clicked. To add this new row dynamically I am calli...

Background color property slide up.

The question is in in transitionBackground function. In this case, the function triggers when the up button is pressed on the page. <html> <head> <title>Case: Background Transitions</title> <script src="jquery/jquery.js"></script> <script> $( var transitionBackground = function (){ if ($(div)...

Problem with posting xml data to .net webservice asmx

I have the following code which is trying to post xml constructed data to webservice .asmx but xml constructed data is not reaching webservice file at all.when i make ajax call control is not moving to webservice file at all.Is their any problem with syntax in ajax. This is my code on client side . $.ajax({ type: "POST"...

jquery.ajax set with async=true to send data back to server not working if page redirects/reloads.

I'm trying to save some content whenever a button/hyperlink is clicked using jquery.ajax (Using Asp.net 3.5). The logic is as follows: Through .bind in jquery I bind my own method(MakeLog) to a button click or hyperlink click. The click events of button/hyperlink contain nothing, I need to use .bind for selective controls. Now we h...

How to use DataTables jQuery object with ZendX_jQuery

Hi Everyone, I am trying to use ZendX_jQuery and Datatables for a project. In my layout file I have: if($this->jQuery()->isEnabled()){ $this->jQuery()->setLocalPath('/js/jquery/js/jquery-1.4.2.min.js') ->setUiLocalPath('/js/jquery/js/jquery-ui-1.8.4.custom.min.js') ->addStylesheet('/css/smoothness/custom.css') ->addJa...

Difference between $(this) and this in jquery

What is the fundamental difference between using $(this) vs this $('.viewComments').click(function(ev){ //returns the desired value alert(this.getAttribute('id')); //Gives an error sayin function is not defined alert($(this).getAttribute('id')); //returns the desired value alert($(this).attr('id')); }); What...

Jquery Fullcalendar (arshaw's) events un-editable

hi all I have tried some code for fetching events from C# application to my fullcalendar plugin interface. The code is posted below. Code explanation: DefaultAdmin is the main page where calendar is located. It calls eventsList.aspx to fetch events data in json format. A value object called CalendarDTO.cs is also used. Problem: When...

Page disappears when scriptmanager calls jquery dialog.

Hi, I got a problem in my Asp.net application. When I try to save some data, I check if the data is right, When not I call a jquery dialog with the error message. But when my jquery dialog appears, my background form dissapears. and I get a javascript error: "html parsing error unable to modify the parent container element before the ch...

How can i dynamically change the time (which is plain text) using JavaScript or JQuery?

Hi folks, on this website the textual time is dynamically updated .. i'm guessing using javascript. this is the html code, using Firebug to inspect the page ... <strong class="big" id="ct">Friday, 3 September 2010 at 8:17:21 AM</strong> with that time value incremementing each second. I'm guessing some javascript updates the 'ct' e...

Dynamic Odered list with jquery selectable control

I got this mockup, I need to load dynamically pictures from a db and once loaded I need to click on each picture in order to mark what scholar will be promoted to the next grade, I'm figuring out mark it with a star image when I click on the picture, maybe an overlay div on each image that it is activated when I do click. Any idea how c...