jquery

Jquery Show Hide Function

I am using the jQuery function function ShowHide(){ $(".login").animate({"height": "toggle"}, { duration: 1000 }); } and the link to show hide the .login div is: onclick="ShowHide(); return false;" But this link only toggles the div to show and hide, but I want it to also hide when the user clicks off the div, I have a page wrapp...

if selectors chaining?

ok, im trying to animate something to different heights if a selected id has a selected class. i have the following code. function myfunction() { if ($('#homebutton').hasClass("active")); { $('#content').animate({height: "240px",opacity: 1}, 100 , hideLoader()); } if ($('#showbutton').hasClass("active")); { $('...

How to "handle" the browser autocomplete on input text ?

Hi, I have an input text login/password, i use a label which i display inside the input, when the input takes the focus, the label is hidden, when the input it is blurred if the value is not equal to "" the label is displayed again, it works great using the focus() / blur() functions, but, how could i handle the browser auto filling, b...

jQuery double quotes

hi there, i have this form: <form name="myForm" action="#"> <input type="text" name="firstField" /> <input type="text" name="secondField" /> <input type="submit" name="submitButton" /> </form> and i have an ajax request: $('input[type="submit"]').click(function(){ var serialized = $('form').serialize(); /...

Cursor position, jquery

From this post I found and answer on how to position the cursor in a textarea. I am creating a jquery chat and I wanted to create a simple html textarea, having a div infront of the textarea displying the html contained in the textarea. Mark posted the following script: $.fn.selectRange = function(start, end) { return this....

JQuery under IE

Hello. Im using JQuery with css to show div's on a page with the Click command. like this code here. $("#img1_hover").click( function(){ $('#img1_show').addClass('img1_show_vis'); $('#img_shower_1').addClass('img_shower_vis'); $('#close_btn_1').addClass('img1_show_x_vis'); } The code work fine under Firefox but it does...

Scrolling in JQuery

I want to scroll to a div + 100px in the y axis. How do I do that? $.scrollTo('div100' + '100px', 2000) doesn't work. ...

jquery ajax online support chat

Is there any FREE script available for online customer support in AJAX, JQUERY , php like person have own window to chat ... Thanks ...

Updating a table's ActionLinks in MVC using JSON and JQuery

I have the follwoing HTML to show image actions inside a table element: <%= Html.ActionLink("[EditImg]", "Edit", new { id = item.GrossBaseReconId }, new { id = "BaseReconEdit", rowsid = item.GrossBaseReconId }).Replace("[EditImg]", "<img src='/Content/images/page_white_edit.png' alt='Edit Details' title='Edit Details'>")%> <%= Ajax...

jQuery JSON Associative Array

How do I access the name of an an item in an assosiative array using jQuery. For example how would I read "title", "link", "media", ect... in this { "title": "What we do in our free time...", "link": "http://www.flickr.com/photos/tnhimmies/4042938515/", "media": {"m":"http://farm3.static.flickr.com/2572/4042938515_3a00561320_m.jp...

jQuery find parent form

i have this html <ul> <li><form action="#" name="formName"></li> <li><input type="text" name="someName" /></li> <li><input type="text" name="someOtherName" /></li> <li><input type="submit" name="submitButton" value="send"></li> <li></form></li> </ul> How can i select the form that the input[name="submitButton"] is ...

create JQuery object by passing DOM object?

So, let say I have this: var d = document.createElement('div'); d.id = "whatever";` So, d is the DOM object, how can I create or convert it into jQuery object? e.g. $(d) ??? and, how to 'read' all attributes of the jQuery object? just like the var_dump of PHP. ...

Best approach to a dynamic google map?

I have a php page that will render a profile of a place from a database. I am looking for a way to have a "view-map" option that either dynamically get's filled and links to google, or figure the best solution with jquery or normal JS. I can place the address using php, or have it be pulled for a jquery application. I am really not th...

jQuery Supersized Plugin callback when slideshow finishd

I am using the Supersized jQuery plugin which makes images fullscreen and also implements a slideshow. Currently, this plugin does not have a callback for when the slideshow is finished, rather, it just continually repeats. Is there a way that I could trigger a function after the last slide is shown? Currently, I have it working to tr...

How to send back js.haml in rails

I have a rails create action which send back some jquery in a file: create.js.erb var appearance = $("<%= escape_javascript(render(:partial => @appearance)) %>").effect("highlight", {color: '#E6ff00'}, 2000); $("#sortable").append(appearance); $("#new_appearance")[0].reset(); I have started using HAML and want to know how I should be...

how to solve jquery and mootoools conflict

I use < script type="text/javascript" src="jquery-1.2.2.pack.js"> < /script> to load jquery and then load an external script that contains these : var jkpanel={ controltext: 'menu', $mainpanel: null, contentdivheight: 0, openclose:function($, speed){ this.$mainpanel.stop() //stop any animation if (this.$mainpanel.attr('...

Improve this jQuery?

I'm a jquery noob--using easyslider 1.7--buttons are over the slider--so effects muddle the jQuery...using simple show/hide right now and works fine! I want to improve the following medial code to be a little more eloquent, if possible. I'd like the buttons to fadeIn/fadeOut on hover of the slider div, and stay visible when hovering ov...

Find and disable fields of a certain name or ID using jQuery

I have a number of input fields that I would like to enable or disable based on the state of a checkbox. Specifically, any fields with IDs beginning with "ship1" I would like to find and disable them when the box is checked. Anyone know how? Here's a snippet of my page: <div id="tabs-1"> <fieldset> <legend>Ship...

jQuery cluetip memory leak

Hi, I have been tracking down a memory leak in my web app which dynamically removes and adds anchors which have cluetip tooltips attached and I think that I may have narrowed down the problem to the main closure in cluetip which attaches the cluetip to the node (line 32: var link = this, $this = $(this);). I have been running the f...

jquery accordion header

Hello I am using the jquery accordion plugin on 2 divs so I setup my divs like this <div id="contacts" class="mainStyle"> <h3 id="headeronline"><a href="#">Online</a></h3> <div id="onlinecontacts"> </div> <h3 id="headeroffline"><a href="#">Offline</a></h3> <div id="offlinecontacts"> </div> </div> the...