jquery

Display/Hide part of a list

Hi I have an (unordered)list (generated by a repeater) of items. However, I'd like to show the first three items, and have the rest hidden by the main content div. When a button is pressed, I would like the list's div to expand, pushing the main content div down and showing the rest of the list. I was thinking of using slideDown(), bu...

jquery nested sortable

I have been using NestedSortabe from b-hind and found it quite useful until I upgraded to latest jquery and jquery-ui I guess they changed the way mouse events are handled or something to that effect. Point it the nestedSortable doesn't work any longer. So my question is tri fold does anyone know if the folks at jquery have implement...

How to match the word in jquery

I have the image and i am fade in and fade out the image on click. But i want that if the same is present then it should not fadein/fadeout. My jquery code is switch(current_id) { case 'l1': $("#left_img img").fadeOut(500, function() { $(this).attr("s...

execute javascript method after completing code behind method ?

I want execute below callback() method after completion of document.getElementById('btnDownload').click(); method . Now callback()executing immediatly. I want wait "Click()" process done then Execute callback(); method. function LoadPopup() { // find the popup behavior this._popup = $find('mdlPopup'); // show t...

How to keep submit button visible and executable upon textarea onblur

I have a <div id="comment_posting_holder"> tag that holds a form with two elements: a textarea box and a submit button. I want to have the div tag (containing the textarea and submit button) disappear if I click somewhere "OTHER" than the submit button. I have a start for the code below. So upon leaving focus from the textarea, I can ...

Validation Summary with JQuery in MVC 2

I'm trying to get client validation working on my asp.net mvc 2 web application (Visual Studio 2010). The client side validation IS working. However the validation summary is not. I'm including the following scripts <script type="text/javascript" src="../../content/scripts/jquery-1.4.1.js"></script> <script type="text/javascript" src="...

jQuery + External javascript: How to embed videoplayer in div

I just started with jQuery and so far I have a really good impression of the framework. But now I have a problem that I can't figure out on myself. I want to embed an external javascript file that loads a videoplayer and displays it. If I include the <script>...</script> directly in HTML it loads just fine. But when I try to load it with...

javascript highlight text(IE7/8) Issue

Hi its a browser(IE) issue i have a code and its does highlight on selected text....its working fine but when i m selecting text that already selected then its not highlighted(Selected) on IE7/8 plz see code below if (window.getSelection) //Firefox { range = window.getSelection().getRangeAt(0); var sel = window.get...

Apply jquery selectbox style on chained selectbox

Hi all, I have created a pair of chained selectboxes in my page. The second selectbox is filled with a set of values, depending on the first box's selected value. The script that makes the two selectboxes work like this, uses php and javascript. This is the code I'm using: form <select name="continent" tabindex="1" onChange="get...

jQuery .toggle() called by window.setInterval() not functioning

I am trying to alternate between two logos every 5 seconds using the following code: window.setInterval( function () { //breakpoint 1 $("#logo").toggle( function() { //breakpoint 2 $(this).attr('src', '/Images/logo1.png'); }, function() { ...

jQuery - .Ready fires on div tag not in the page

Dear all, I have implemented below function in a separate .js script file which I load in my main page (Asp.net mvc). The call back to server is rather costly but ok if specifically requested on the sub-page / content page on which my div tag needs to be filled. My problem is that the code runs on every page, including pages where the...

Invalid Label Error with JSON request

I've read about this a lot and I just can't figure it out. It has nothing to do with MY code, it has to do with the feed or something because if I swap it with a Twitter feed it returns an Object object which is perfect. $.getJSON('http://rockbottom.nozzlmedia.com:8000/api/portland/?count=1&amp;callback=?',function(json){ console.lo...

Not able to send POST request through jQuery Ajax

Hi, I was trying to send an ajax request as POST request. But when i verified it on httpFox on firefox, the request is sent as GET. I tried both $.ajax() and $.post(). Many had a query regarding the same and had missed the "type" in $.ajax(), but even if i mention the type as "POST", the request will be of type GET. Here is my code: ...

Problem catching errors occured in jquery ajax method.

hi, I am using jquery ajax method on my aspx page to call a web method in the code behind.If the call fails,for any reason I would like to catch the error and display a meaningful message to the user.Following is my jquery ajax method code. $.ajax( { type:"POST", url:"Default.aspx/createitem", data:JSON.stringify({question ...

Same widget code on page

Hello, I'm creating a widget using jQuery. It's a charting widget which communicates with the server (PHP) through ajax to update the chart. My problem is that I need 2 of this widget on the same page without one overwriting the other. How can I encapsulate the javascript code without using the same code twice and without defining sepa...

detect where a redirect wants to go with jQuery

Hi there, I have a page with a flash plugin. If I'm on that page, I don't want to post a message if the user wont to leaf it without saving it...: if(/containers/.test(document.location.href)){ window.onbeforeunload = function(){ return exit_text; }; } This works fine, except that I if i save the content in the flash ...

jquery 1.4.2 tabs problem

I'm new to this forum and jquery, recently i've updated new version jquery 1.4.2 after that, initially while loading the web page my first and default tab showing the last tab content, once we clicked on any tab then the problem solved automatically, again if we load the page again the same problem ocurrs. following is the code i used ...

Why doesn't this work? jquery javascript

$(document).ready(function() { musicList = new array() counter = 0; if($(".rA, .trA, .dA, .hA").length > 0) { /*$(".rA, .trA, .dA, .hA").each(function(e){*/ $(".hA").each(function(e){ $.post("/index/audio/ajax.track", { id: $(this).attr("rel") }, function(data){ /*THIS DOE...

jquery mutually get value of exclusive checkbox

Hi I need a sample code to get the value of selected checkbox. The checkboxes are mutually exclusive and I would like to get the selected checkbox value on the click of a button Thanks ...

referencing (this) in a function

I have elements being generated by dynamic html, I would like to reference the particular href that is calling the function when one of many may be calling it. <a href="javascript:Foo(this)">Link</a> Does not work when I try to reference $(this). Is there another way to do this or do I have to make dynamic ids? ...