jquery

jquery buffer/queue for effects? Or to tell if an effect is in process?

Hi there, I have a click event that checks to see if a form is correct i.e. filled out details.. and then i call a function that does this $('#message_text').html(text); $('#message_system').fadeIn("slow"); $('#message_system').animate({ opacity: 1.0 }, 5000) .fadeOut('slow', function() { $(t...

set div visible fasle in get method of controller

I am using C# with MVC. I want to set the div visible true/false based on a condition from database in the Get method of Controller. Please suggest ...

How can I implement a "Related questions" feature like the one on Stack Overflow?

I want to implement a feature similar to the "Related Questions" list shown when asking a question on Stack Overflow. I like how the related questions populated when the Title is filled in. I am using ASP.NET and jQuery. How might I implement something like this? Can anyone point to examples? I looked at the source of the ask question ...

jquery to convert strings to json to send to my webservice?

Hi there, Trying to figure out how to convert how to covert 5 variables i have in javascript (strings) to a json for sending along to my ajax function here is my ajax funtion, sill relatively new to this but i believe this should work .. but i need to convert all my strings to a json - don't i? I believe there are alternative ways of ...

calling a webservice with jquery that accepts five STRING params?

Hi there, is it possible to call a webservice that accepts 5 string parameters without sending via json? (is this recommended) I have created a webservice with a method that accepts 5 string params.. and i have my jquery $.ajax({ type: "POST", url: "Service.aspx/CreateClient", ...

PHP XML Simple Load

I have a light box currently working www.idgc.ca/web-design-samples.php but when I converted the whole page in a Simple XML www.idgc.ca/web-design-samples-testing.php it stopped working.... ...

Checking Jquery ajax load success

I've been using this to load another page: http:||docs.jquery.com/Ajax/load and just using their example, $("#links").load("/Main_Page #jq-p-Getting-Started li"); However I want to run a function when the load is successful, and a different one if it fails, unfortunately the description on the callback says: The function called when...

Should I link to Google API's cloud for JS libraries?

I'm looking for the pros/cons of pulling jQuery & other JS libraries from Google API's cloud as opposed to downloading files and deploying directly. What say you? My decision The likelihood of the lib already cached on the users system is the overriding factor for me, so I'm going with a permalink to googleapis.com (e.g. ajax.googl...

jQuery Ajax JavaScript Execution

Hello everyone, I have jQuery ajax requesting a page that returns html with <script> tags inside that html, I have the dataType option set to "html" so that I get the JS inside the <script> tags executed, this works fine but the problem that it takes the browser from 2-3 seconds to evaluate the returned JS after the ajax response, why i...

Calling asp.net webmethod with params from jquery errors

Hi there, I managed to setup a simple webmethod which i called from jquery and sure enough it returns ... then i added parameters on the method and added the params to jquery but it errors with Message":"Invalid JSON primitive: one.","StackTrace":" my signature on my webmethod is like so [WebMethod] public static str...

A question about referencing functions in Javascript

The problem: I have a jQuery heavy page that has a built in admin interface. The admin functions only trigger when an admin variable is set. These functions require a second library to work properly and the second file is only included if the user is an admin when the page is first created. The functions will never trigger for normal use...

jQuery n00b question: locating text and performing operation based on its existence

I'm trying to learn jQuery, but it's coming slowly as I really don't know any JavaScript. My site is in VB.NET and I'm putting jQuery code on both my actual .ascx UserControl and in a separate file (something like myscripts.js). This is because I'm using webforms as I still don't know MVC well enough to implement it, so I have to get t...

Passing js object as json to jquery?

I have the following but it's not working, I read somewhere on the stackoverflow that it works like this but I can't seem to get it to work.. it errors... am I doing something wrong? If I do pass data like this - it works -- so I know my service is working //THIS WORKS data: "{one : 'test',two: 'test2' }" // BUT SETTING UP OBJECT do...

What is the difference between the bind and live methods in jQuery?

I'm curious to know the differences between the bind and live functions. To me they seem to be almost identical. I read this, but it didn't tell me about the differences... Thanks! ...

Getting only a part of a file

I have some very simple sample code like this: $.ajax({ url: 'demo2.htm', success: function(loadeddata){ $("#loaded_data").html(loadeddata); alert('success'); }, error: function(){ alert('failure'); } }); Loaded data currently returns everything. What I need to is to get only a specific div and make it the html ...

Modular Javascript library with functionality similar to jQuery.

jQuery and similar libraries provide a number of useful APIs for DOM traversal and manipulation. Where your site as high number of repeat visitors, their use is easily justified as caching will offset any bandwidth cost to the end user. In other cases visitors to the site might always be unique and thus the bandwidth penalty for these l...

Can you get (using jQuery if possible) the current scrolled position of an element?

I am using this code on a 'down' button to scroll text in an overflowed div. var textHeight = text.outerHeight(); var pageDown = $('#page-down'); var pageUp = $('#page-up'); pageDown.bind('click', function() { pageUp.fadeIn(500); text.animate({ scrollTop: '+=' + textHeight + 'px'}, 50...

A jQuery question about variables and selectors

Lately, I have been doing this in an effort to speed up performance (and sometimes it helps with maintainability) var objectToReference = $('div .complicated #selector ul:last'); So what does objectToReference really hold? Sometimes things have bitten me, so I've gone back to using the full selector and it has worked. So does the var...

Order of stacked HTML elements

I am looking at a jQuery screencast (jQuery for Absolute Beginners: Day 8). It has this code: <script type="text/javascript"> $(function() { $('.wrap').hover(function() { $(this).children('.front').stop().animate({ "top" : '300px'}, 900); }, function() { $(this).children('.front').stop().a...

How to access xml text node in Jquery

Suppose I get the following XML structure: <root> <item> <item1>text1</item1> <item2>text2</item2> more text here </item> </root> "more text here" is a text node that is at the same level as the other data nodes in the hierarchy but it does not seem to be accessible. Is there a way of extracting the text node shown above using jQu...