jquery

Persist Textbox in cookie/session automaticly

I am attempting to persist what the users enters into a textbox without them clicking save. It would simply save what the user entered into the textbox so when they navigate away and then back to the page it will be reloaded. once they are click "done" the session will be removed. I have been trying to do this with Jquery but I have bee...

jQuery pause function execution and do something else while paused

I have something like this: function doSomething() { var obj = $('somediv'); ... waitAndDoSomethingElse(obj); ... $('somediv').show(); ... } function waitAndDoSomethingElse(obj) { obj.fadeIn(); .... } I want doSomething() to pause... execute waitAndDoSomethingElse() and then continue... Any ideas? Thank ...

ASP.NET Update Panel stops jquery from working

I have binded jquery events set for mouseenter mouseleave, as well as jquery draggable. The divs are placed in an update panel and when a button is clicked information is sent to the database and the update panel is updated. However when the panel is updated the jquery events no longer work. Any idea as to why this would be the case? ...

Filtering Questions by Answer Count

(A jQuery Question about filtering stuff on StackOverflow. I swear, it doesn't belong on Meta!) Question I am looking to use a Greasemonkey script to filter the questions on the Home, Questions, and Unanswered Page. Right now I have a solution for it (below), but it takes a few seconds to process, and I was wondering if there is a bette...

How to change Jquery UI Slider handle

I want to modify the stock JQuery UI slider so that the handle has a arrow on it rather than being a square. i.e. I want to use a custom image as the handle. There are a few tutorials that do it: http://jqueryfordesigners.com/slider-gallery/ http://www.ryancoughlin.com/2008/11/04/using-the-jquery-ui-slider/ http://www.keepthewebweird....

How do I set the text of a child DIV inside a repeater?

I have a repeater containing the following HTML snippet: <div id='parent'> <div id='child1'/> <div id='child2'> <script type="text/javascript" src="script.js"></script> </div> </div> I would like to select the div tagged "parent" using a function inside script.js and set the inner HTML of the div with id "child1"....

Use Jquery to navigate away from page

I will only have a relative link available to me but i want to use Jquery to navigate to this rel link. I only see .ajax functionality in jquery. how can i do this using jquery or just pure DHTML/javascript? ...

Simplify jQuery Selector

I have a selector, "td > a.leftmenuitem:last, div > a.leftmenuitem:last", and I'd like to simplify it a little. I've tried "* > a.leftmenuitem:last", "td, div > a.leftmenuitem:last", and "(td, div) > a.leftmenuitem:last", none of which work the way the first selector does. Is this kind of thing just not possible in the selector syntax wi...

jquery accordion menu states

I have a accordion menu with a header image that changes based on the state (open/closed) the problem is once any part of the menu is open the open state images stays, even if the section of the menu is closed. I'd like the closed state to come back once that part of the menu is closed. Code $(document).ready(function() { ...

Why isnt my Jquery background image switching?

Heres my Jquery $(document).ready(function(){ $('a.toggle').css('background-image','url(http://blah/resources/img/close.gif)'); $(".sectiontitle").click(function(e){ $(this).next('div').slideToggle("slow"); el = $(this).find(".toggler > a.toggle"); currBg = el.css('background-image'); if (currBg=="url(http://blah/resources/im...

How do I access different levels of "THIS" in jquery?

I realize the code below is not the most efficient way of grabbing elements, but for the sake of an example... $('.myFirstClass').each(function(i){ // Here is the first 'THIS' occurrence $(this).find('.mySecondClass').each(function(j){ // Here is the second 'THIS' occurrence // How do i access the first occurrence from...

Event Bubbling from update Panel

When you do an update with update panel I loose all my jquery elements that attached them too the elements of the DOM inside the update panel. Is there a way to reattach these when update panel fires? ...

Autocomplete + Hidden Field in jquery?

I am trying to do an autocomplete that will display something and then put something else in an hidden field on selection. Example: In my database I have {[1, 'john'], [2, 'bob'], [3, 'john']} If the user type 'jo' and clicks on the first 'john', I have no way of knowing on what entry he clicked. So I need some kind of associated hidd...

How to loop through my Json response using jQuery?

My Json response looks like: [{"UserID": 1}, {"UserID", 324}] I call the page to get json like: $.get("myurl.aspx", {blah:1}, function(data) { $.each(data.items, function(i, item) { alert(item.UserID); }); }); Firebug is reporting the error: G is undefined. ...

jQuery: fadeout an image when clicking an ASP.NET ImageButton

I'm building a photo gallery in ASP.NET. The user can browse thumbnails along the left and select one, which brings a preview-sized version into the right pane of the page. I'd like to fade between the images, so that the current one fades out and the next one fades in. I'm using jQuery to fade the preview image in after it is loaded, ...

How to use jQuery's load(fn) method so it actually works

JQuery documentation has this to say about .load(fn) (http://docs.jquery.com/Events/load#fn ): Note: load will work only if you set it before the element has completely loaded, if you set it after that nothing will happen. So when one is supposed to bind the load event for <div id="test">? As far as I understand doing it befo...

How to add items to a unordered list <ul> using jquery

Hi, In my json response, I want to loop through it using $.each and then append items to a <ul></ul> element. $.each(data, function(i, item) { // item.UserID // item.Username } I want to add a , and create a href tag that links to the users page. ...

jQuery Set Mouse Position (not cursor position)

I have a link that, when clicked, I would like it to move the position of the mouse to the right (or anywhere within the viewport, for that matter). in code it would probably look similar to the following: $('a#expand').click(function(e){ $(document) .mouseXPos(e.pageX + 50) .mouseYPos(e.pageY + 50); }); Chaining mi...

Tab style nav bar with Jquery

Hi I have been trying to find an answer to this question. I am trying to create a nav bar using jquery that uses rollovers. So there is an On state, off state, clicked state for three diffrent tabs/images. example: Home | Support | About The problme i'm having is getting the clicked/on state to turn off the other image/tab if it was al...

What is a good jQuery lightbox clone?

It must be: easily skinnable with css be able to handle forms and not just images be well documented Any suggestions welcome Many thanks ...