jquery

Mega Drop-Down Menu: Is there a way to reposition a long menu to make it visible within the screen

Hi, I am working on this mega menu: http://www.sitepoint.com/blogs/2009/03/31/make-a-mega-drop-down-menu-with-jquery/ Sometimes the dropdown menu overshoots the screen coordinates. Is there a way to reposition the menu so that it gets displayed within the screen coordinates at all times? Thanks. ...

ajax calls work super fast on IE8 and not sow fast 1~ 0.5 sec on other browsers

I have something like a blog where user adds a new post the new post is shown together with the others (all the requests to the server are using $.post) on IE8 everything works super (A robot would have the possibility to add 10 posts a second) but on other browser the time until the new post appears is 0.5 ~ 1 sec anybody knows why ? ...

JQuery. Layout is shaking during animation

Hello everybody, JQuery accordion animation (as well as simple hides / shows) looks weird with some browsers (IE, Opera). But Fire Fox and Chrome renders animation perfectly without artifacts. Html layout tends to shake with IE / Opera during animation as if surrounding paddings / margins are changed for small random value. How can I...

Use anchor to display div

I'm using jquery, and need to accomplish a couple things. 1) When someone clicks on a link (or in my case, a div) to display another div, I'd like to add an anchor to the url. So, if someone clicks on a "Live" link, the 'live' div slides down, and we append #live to the url. 2) If someone visits that page and keeps the #live anchor...

how can you add one month to a date in javascript / jquery

if i have a textbox with a date in it, i want to change the textbox to show one month later ...

Display both summary and individual error messages using jquery validation plugin

Hi, I'm just wondering how can I display both individual error messages and summary for the jquery plugin, I actually found a similar question but it just reference some hooks I can use, but I'm not sure where to start, I got the displaying individual error messages part, but I need to display the summary in an alert box on submit, plu...

How to return radio checked object with jQuery ?

HTML <input type="radio" name="rdName" id="uniqueID1" value="1" checked="checked"> <input type="radio" name="rdName" id="uniqueID2" value="2"> <input type="radio" name="rdName" id="uniqueID3" value="3"> jQuery #1 $('input:radio[name=rdName]:checked').val(); jQuery #2 $('input[name=rdName]:checked'); jQuery #1 gets the value of c...

output txt file with selectbox options in php

I am trying to display two selectboxes in my php page ,where the user can select options from first selectbox to add it to second box and then click a button to generate a textfile with all the options in the second selectbox. Can anyone please help? (IE 7 only please) Here is the code that I tried till now. <html> <head> <script lang...

Is there a way to access a PHP class method using JavaScript through jQuery?

I have a JavaScript script: $("#feedbacksubmit").click(function() { if($("#frmfeedback").valid()) { var tname = $("#name").val(); var temail = $("#email").val(); var tphone = $("#phone").val(); var tcontent = $("#content").val(); var tsend = $(this).attr('ts'); $.post ( "bll/index...

jquery : how to test for Ready when document is in a FRAME and it contains a large image with an image-map?

I am encountering problems which I believe to be related to the document (inside a FRAME) not being quite ready to go, and would like to know what the best practices are for testing for "ready" using jQuery 1.3.2 -- the version required for a particular plug-in that I'm using. Also, should the test be done in the document that sets up...

Why can't I set attribute "TYPE" of LI element in IE?

Hello, I've just come to an unusual beghavior of Internet Explorer IE (v8.0.6001.18904). When I try to set "type" attribute of any <LI> element, it will result into error. I used jQuery (v1.32): $('<li>').attr("type", "test"); or $('<li type="test">'); The same thing works for DIV. LI element does not seem to have "type" attribute r...

jqGrid filtering on the client-side using "filterToolbar"

Hi guys, I have to add filtering to a jqGrid that is completely managed on the client side (data is only loaded once from the server). I need to use filterToolbar in order to filter the grid data, but couldn't find info if there is a default search mechanism on the client side. Is a server-side search the only way to do this? Thanks, ...

Cancel request in google ajax api

I'm doing small AJAX searchbar with "new google.search.WebSearch();" from Google AJAX Api. How do i can cancel an ongoing ajax request? I usually do a: var xhr; function Something() { xhr.stop(); xhr = $.get .... } in jQuery. What is the equavalent for the Google websearch object? ...

How to find jquery versin in richfaces

What version of jquery that richfaces(3.3.3.CR1) supports. How to find it? ...

Counting divs for pagination in Jquery

I want to create a nice pagination in Jquery for a number of divs I have. EG: <div class="container"> <div id="one">content</div> <div id="two">content</div> <div id="three">content</div> <div id="four">content</div> </div> The number will not always be the same so I need to count the divs, and display a pagination l...

How to capture the value of a textbox inside the dropped item

Hi I am using the JQuery plugins Draggable and droppable and this is my draggable item structure . The Textbox value is the qty of the item being dropped onto a shopping cart. This will be changed by the user before he drops it onto the cart section. I need to capture this value after its dropped. <div class="something"> <ul...

jQuery .ready() automatically defining variables for each element with ID in DOM

I have noticed some unexpected behaviour when using the jQuery .ready() function, whereby afterwards you can reference an element in the DOM simply by using its ID without prior definition: <html> <script src="jquery.js"></script> <script> $(document).ready(function() { myowndiv.innerHTML = 'wow!' }); </s...

What is the easiest method to get the selection in input text field ?

How could I get the selected text in the following code ? I working with Firefox 3.6.3 (currently not interested in other browsers). HTML: <input id="my_text_field" type="text" /> <div id="log"></div> JavaScript: $("#my_text_field").select(function() { var selected_text = "Something selected"; // What should be here ? $("#log...

Logged out from one tab. User should logged out from other tab.

I am using jqury ajax call to update data. I logged in in two different tabs in firefox. I logged out from one tab. The second tab is not yet refreshed. When i tried to update data through ajax call the call executed properly. How do i catch the user is logged out and display error while executing the ajax call. ...

JQuery Slideout only works on one side of the page?!

I've been working on a little slideout code and it's just been impossible. It works perfectly sliding out from the right of the page but when I reverse everything and have it slide from the left, not a chance! The exact issue is that it slides out farther than the width of it's container. Example at http://demindu.com/sandbox/slideout/...