jquery

jQuery with ASP.NET - How to Create, Populate, and Show UL

In an ASP.NET web app, I am trying to create and populate a UL based on user input. This is not a quick fill. User enters a couple of letters, clicks a button, and the server returns all records like the entry. If there is more than one match, an UL is created showing all of the matches. I've tried to adapt this code from a plugin...

jQuery POST not changing IsPostback variable

Hi, When using jQuery to POST data back to the server, I'm getting some strange behavior. If I include __VIEWSTATE and __EVENTVALIDATION in my serialized form data, the IsPostback page variable is set to true, If I exclude these two, the IsPostback is set to false. Its easy enough for me to include these two variables but does anyone ...

How to preserve html when parsing xml using Jquery

Suppose I have the following XML structure: <root> <item> <item1>some text is <b>here</b></item1> <item2>more text is here</item2> </item> </root> I can parse the xml using something like: $(responseXML).find('item').each(function(){ var first_text = $(this).find('item1').text(); var second_text = $(th...

jQuery: set value of table cell inside div

I have a floating div which contains a title and I want to change that title. I tried this: $("div#dragTitle3").text("New Title"); But the title is actually in a table inside the div. This is the table: <table><tbody><tr><td>Announcements</td><td style="text-align:right"><img src="buttontop.png" class="divTitleButton" id="dragButton3...

Javascript/CSS load and append to document

Hello, I have written a jQuery plugin, but I want it to check if jQuery has been loaded, if not then load it, as well as a couple of other javascript files and also check if CSS file has been loaded, if not then load it. Am wondering how to go about it? thank you very much for your time. ...

recommended return type for a webservice that doesn't return anything (called with jquery)

Hi there, I have a web service with some methods, they technically don't do much on the client.. i am calling it by jquery/ajax What is the recommended return type, i would normally return JSON ... but in the case that it doens't return anything .. do i return a boolean? i.e. true = succesful ... and false = error ?? Any ideas? ...

When input button is clicked, perform an action

Here's my code: <script> $("#btn1").click(function(){ baseURL='http://domain.com/base1'; $("input#Race").val("btn2"); $("input#Race").attr("id","btn2"); }); $("#btn2").click(function(){ baseURL='http://domain.com/base2'; $("input#pet").val("btn1"); $("input#pet").attr("id","btn1"); }); </script> <td><input class="inputbu...

Jquery Ajax animation?

Hi there, I have a ajax jquery petition ... is there a standard way of displaying a nice animation while it completes. Anybody have any info? Its just that petition is taking around 15 seconds when there is an error in the server... so i would like to display an animation in case of this situation... I am not necessarily talking abou...

jQuery / JS animation screwed up (Firefox/IE)

edit: Problem seems not to be limited to IE, see my answer post below for a testcase. Hello, I am rotating between 3 different background images on a logo: $(function() { function Animate_2() { $("div#bg1" ).animate({opacity: 0 }, 2000); $("div#bg2").animate({opacity: 100}, 2000); setTimeout(Animate_3, 5000); ...

Jquery dynamic addition of form fields problem

I'm using the following code to insert extra form fields. function addFormField() { $("#divTxt").append("<div id='education" + id + "'><input name='name' id='name' type='text' size='20'><a href='#' onClick='removeFormField(\"#education" + id + "\"); return false;'><img src='images/minus.gif' width='10px' border=0></img></a></div>"); } ...

jQuery Pagination from Given Records ID

Hi all, I have found many pagination coding for jQuery plugin. Everything is working fine. But my need is, i have 20 records in table.I want to display only one records at a time with First - Previous - Next - Last . when i enter particular Records Id like '15', It should show that details of 15 , and if i click next it show next R...

Why does the content of this page shift a few pixels to the left/right?

I'm using a "Centred Header/Footer/2 column CSS" layout. In test1.htm if their is minimal page content and the page footer is fully visible within the browser window then when you click on test2.htm the page content shifts to the left. If test1.htm has enough content to push the footer off the bottom of the browser window then when you...

jquery moving from postion X to position Y slowly - animation?

Hi there, i have a simple jquery animtion using fadein and it works but once faded in ... i wish to MOVE using TOP property 30 pixels upwards.. but slowly.. this is what i have so far. $('#Friends').fadeIn("slow"); Any ideas? I have both jquery and jquery UI loaded... ...

How to make menu by using Master Page with jquery?

Hi guys nowadays i m making one mvc project and i use master page i wanna make menu with items have active preferences i used $(document).ready(function() { //document $('#tabMenu > li').click(function() { //clik if (!$(this).hasClass('active')) { //if $('#tabMenu > li').removeClass...

jQuery Cross domain ajax calls and Internet Explorer

The following code works fine in Firefox but in IE the link is never called, the exception is called with a rather generic [Object Error] var GoalID = "e13e68a8-ae18-49f1-9d2f-e052a63fac51"; try { $.ajax({ type: "GET", url: "http://www.externallink.co.uk/GoalAccessed.aspx?id=" + GoalID, dataType: "script" }); }...

Help needed on jQuery find function

Hi guys, This might sound a little dumb, but can you please point out why in the following script 'firstValue' is undefined and 'secondValue' is as needed, i.e. 4. <div > <input class="feedback-selected" type="hidden" value="4" /> </div> <script type="text/javascript"> var firstValue = $(this).find('.feedback-selected').val();...

How to verify that the mouse over an element?

Hello, Do you know how to check whether the mouse is over an element? Somethnig like this? setTimeout(function() { if($(this).mouseover()) { // this not work return false; } else { $(this).hide(); } }, 1000); Thanks. ...

How can I remove the original element after doing a draggable event with a 'clone' helper?

I have a list of items which I have made draggable. I am dragging these over to several sortable lists. I have to use the 'clone' helper method while dragging as the other helper methods did not work properly. Unfortunately, I don't want the item to remain in the original list once it has been dropped in the sortable list. How do I r...

JQuery pass more parameters into callback

Hi all, Is there a way to pass more data into a callback function in Jquery? I have two functionsm and I want the callback to the $.post, for example, to pass in both the resulting data of the AJAX call, as well as a few custom arguments function clicked() { var myDiv = $("#my-div"); // ERROR: Says data not defined $.post("someurl.php...

using jquery selectors within google map does not work

I'm using jquery and googlemaps (gmap2). I am finding issues with using the jquery selectors for class divs on the map. When I try to select the div (both ID and classes) I get a null return. I am guessing there's some kind of conflict with the JS google maps. To verify that my jquery is correct, I have tried to select tags and different...