jquery

jquery .each function

If I have 5 input boxes with the class .inputBox my jquery function adds these tags 5 times after each of the .inputBox lines. Why is that? I just want each of these tags inserted once after each .inputBox. Anyone know how to do that? function addImages() { $(".inputBox").each(function() { $('.inputBox').a...

jQuery effect on iframe parent document

Just wondering if anyone else has experienced this or knows why I am getting an error. I'm using javascript from within an iframe to call a parent dom element then use jQuery UI's effect core to shake it. Here is an example: $(document).ready(function(){ if ($("form").length>0) { $("form").submit(function(){ ...

How to Stop Gmail from maximizing an iFrame?

I am trying to create a webpage with Gmail embedded in an iframe. However, Gmail has some javascript code that executes whenever it is loaded. I believe the following js code snippet is what causes Gmail to hijack the window and maximize itself, destroying my parent iframe: if (top.location != self.location) { top.location = self.loca...

Is jQuery 1.4's new behavior a bad design choice?

This is a bit of a rant, but also a very serous question. jQuery has changed ajax param serialization as follows: jQuery 1.4 adds support for nested param serialization in jQuery.param, using the approach popularized by PHP, and supported by Ruby on Rails. For instance, {foo: ["bar", "baz"]} will be serialized as “foo[]=bar&foo[]=baz...

Jquery hover not fast enough

when i leave the selector, the unhover will not occur if i move too fast: $("#item").hover(function(){ $(this).addClass("hover"); }function(){ $(this).removeClass("hover"); }); ...

How to create a floating scrollbar like the one on the iPhone?

Hello everyone, I'm creating a finger friendly web app and am having issues with the scrollbar. Ideally I'm trying to recreate the iPhone's implementation where the scrollbar only appears when the user scrolls the content and disappears when the scrolling stops. Anyone got any pointers? ...

Align background image middle and center

Hi Team, Here's the html: <div class="gallerybox"> <a href="/CustomContentRetrieve.aspx?ID=398791"> <img alt="" src="/Utilities/image.jpg" width="400" height="400" /> </a> </div> Here's the css: .gallerybox {width:200px;height:200px;overflow:hidden;} Can anyone tell me a way to align the linked image inside div.gallerybox middle (...

How to animate specific corners of the border radius when hovered in and out? (Firefox)

I know how to do this for webkit browsers but i'm kinda stuck in firefox. The code below just animate the top-left corner while the rest just snap into places. Here's my code: $('img').hover(function(){ $(this).animate({ MozBorderRadius: '50px 50px 0px 0px'}, 900); }...

Jquery form submit with PHP

Hi there, I need help with what I thought would be a simple form submit problem with Jquery, but am running into issues. I have a form, #listing_step_1, in which the user first selects a category from a dropdown. When a category has been selected, if the user clicks "next", the subcategory dropdown is revealed. When both a category a...

Should a 500 item lookup list be data cached on server?

I have a column of 500 names <30 characters, that are accesses via jquery autocomplete plugin as a drop down list. SHould I data cache this list wich will not change very often, or will i not gain much of a performance benefit? ...

JQuery Carosellite and cycle and parameter from c#

Hi All, I am using jquery Carosellite and Cycle to display images like frames. How to pass values to the properties like speed, visible ect from codebehind(c#). Ex html code: <script type="text/javascript" language="javascript"> $(function() { $(".anyClass").jCarouselLite({ btnNext: ".next", btn...

render / call .aspx page html into another .aspx page

in my application, i have implemented ajax 4.0 client templates currently my templates resides on same .aspx page. (say Main.aspx) but i want to externalize them.(ie all the HTML would go on another page) for that i have used $.get() like $.get("/Module/getTemp/" + TemplateName, function(result) {... now, i want getTemp function i...

Close iframe cross domain

I am trying to do something similar to the Clipper application here http://www.polyvore.com/cgi/clipper I can make the iframe appear in another website (cross domain). But I cannot make the "close" button to work. This is what I used but it doesn't work for cross domain (basically remove the iframe element) window.parent.document.getE...

html button elemenents and onserverclick attribute in asp.net

I have been experiencing some very strange behavior using html buttons with the onserverclick attribute. What I am trying to do is use jQuery to designate the default button on the page. By default button I mean the button that is "clicked" when a user hits enter. In testing, I would hit enter while in an input field and sometimes the i...

Need to disable JQuery Table navigation when focus in on an input field.

Hi, I need to disable table navigation when the focus is on an input field. I could bind to the keypress/keydown events and do it. Does table navigation support something for this? Any other suggestions welcome. Kind regards. ...

jquery, trigger, bind, strange parameter

Hello, I have the following code: <body> <form> <input type="text"/> </form> <script> $( function () { $(document).bind("EVENT", function (event, element) { console.log("BIND", element, event); }); $("form").each( function iterate(index, element) { ...

Setting a greeting based on user's time (Good morning, good afternoon…)

I'm sort of lost. Can anyone extrapolate on how to implement a basic "good evening" or "good morning" based on the user's time setting? Perhaps PHP will fetch the server time, but I'm looking to greet the site visitor with a time-based appropriate greeting that considers their time of day. E.G.: good morning, good night, good afterno...

Problem with JSON, Struts 2 and Ajax.

Hello, I have an apllication with Struts 2, Spring and I want to send JSON as a response to an Ajax request, but my server in not sending the JSON in the response. I have this base package: <package name="myApp-default" extends="struts-default"> <result-types> <result-type name="tiles" class="org.apache.struts2.views.tiles...

Can you set a asp.net web user control property using jQuery?

Can you set a asp.net web user control property using jQuery ...

How to use jQuery to call ASP.NET AJAX Page Method?

How to use jQuery to call ASP.NET AJAX Page Method? ...