jquery

Rounded (image) corners using jQuery

I'd like to apply rounded corners to several blocks using the single image (above). I know there're corners plugins available but I need to use images for max compatibility. So, as I know, the only way is to create wrappers around the blocks to apply the corner images: <div class="wrapper-4"> <!-- top-left corner --> <div class="wra...

jquery dialog close function

hi. i want to refresh the parent site when i close my jquery dialog. i look at the jquery site and the close event but i am not sure if i get it. so i would appriciate a litle help on the way. from what i figure sofar i have to do like this. this is my code for the dialog i use. $("#dialog").dialog({ height: 700, width: 600, closeOnEsc...

What's the maximum number of operators you that can be used in an if statement?

Hi, i'm using jquery and I'm trying to validate a form. My question is - What is the maximum number of tests can you give in a single if statement. function cc_validate () { if ($("#name").val() == "" || $("#ship_name").val() == "" || $("#address").val() == "" || $("#city").val() == "" || $("#ship_city").val() == "" || $("#state").val()...

How to POST without using Submit?

I want to post the Form but don't want to use the Submit method. If I use JQuery, how to handle the Form input controls? ...

Getting text in label that holds both text and checkbox

Hi, <label><input type="checkbox" id="Exep1" checked="checked" onclick="Do(this);"/> My label text here</label> I used : function Do(T){ var XcEP = $(T).parents().html().match(/^[-\s]*(.+?)[\s()\d]*$/,"i")[1]); alert(XcEP); } The function above alerts: <input type="checkbox" id="Exep1" checked="checked" onclick="Do(this);"/> My l...

refresh parent page from jquery dialog.

I want to refresh the parent page when I close my jQuery dialog. this is the code I use for my dialog. I tried top.opener.location but it did not do nothing but put me on top of the page. $("#dialog").dialog({ height: 700, width: 600, closeOnEscape: true, title: 'View', close: function(event, ui){ to...

jquery fullcalender

Hi all, I am new to JQuery FullCalender(http://arshaw.com/fullcalendar/). I need to show only two weeks of a month in the page (I am using ASP.NET MVC framework). Can i show only two weeks instead of full month ? Appreciate if some useful links provided :-) Thanks in advance. ...

Jquery Validation Plugin Method required( dependency-expression ) use ok but callback not working

Hi all, i'm trying to make this work; this validate is applied to a payment form, and as you can see, there are only 3 requierd inputs, if and only if input[type=radio]:checked').val() != "CB"; wich means if user is about to pay with something else than a credit card. Following is the complete code to validate my form. $("#paiement"...

Jquery break Href click

Hi, I have a MVC application with Jquery; I have a gridview with some data and an element which points to a new action of the controller. Now I need to do some validation before executing the action. My code is like this: $('#datosCartolaSeguro a').click(function(e) { var datosProductoSeleccionado = $(this).parent().find('input')....

Combine onload and onresize (jQuery)

$('.content .right').width($(window).width() - (480)); $(window).resize(function(e) { $('.content .right').width($(window).width() - (480)); }); Is there a better way to rewrite this more compactly? I want to call the function onload as well as on resize. Thanks! ...

Trying to use jQuery to display JSON text data

I know very little (none) JavaScript, or much about using API's. However I would like to display some hotel reviews on my webiste made available over the qype.com API. However I'm struggling with being able to manage this. This is the code I have so far: $(document).ready( function() { $.getJSON( "http://api.yelp.com/business_revie...

javascript save dynamic object in someplace for resuse byother methods later on!

i want to save javascript object in a place, so if selected row is getting trigger, i can use that row object again by different methods. maybe saving it in input hidden field can work? but not sure.. how would you do it? im trying to do following, but that dont work, obviously my code is wrong, but i want to show you, so you can maybe...

jqGrid multiselect gives only ids when top checkbox has been checked?

I have a jqGrid with multiselect:true. In a click event of a button I try to retrieve the ids like: var ids = $('#myGrid').jqGrid('getGridParam', 'selarrrow'); However I only get ids to be filled with something if I select the top checkbox in the header. If I do not select that one in the header but select several checkboxes in the co...

JQuery Colorbox

How can I show Colorbox on page load without event binding? In a more simple term I would like the Colorbox to load immediately on page load. this is the Colorbox which I am currently using http://colorpowered.com/colorbox/ ...

jQuery autocomplete special character (Norwegian) problems

I'm using jQuery's autocomplete function on my Norwegian site. When typing in the Norwegian characters æ, ø and å, the autocomplete function suggests words with the respective character, but not words starting with the respective character. It seems like I've to manage to character encode Norwegian characters in the middle of the words, ...

AJAX POST requests with JQuery don't urlencode '+'

I have a lot of JSON data I need to pass to a request: $.ajax({ type: "POST", url: "http://"+HOST+"/users/rankings", data: "friends="+JSON.stringify(friendsArr), success: function(response){ $("#rankings").html(response); } })...

In jQuery, how can I ensure an onchange event fires while setting element values?

I have an address block on a view which can swap some data if the user clicks a checkbox. The javascript function I have for this looks like: <script type="text/javascript"> $().ready(function() { $("#UseAccountAddress").change(function() { if ($(this).attr("checked")) { $("#Street1").val($("#Pri...

InPlaceEditor JQUERY

Currently I implementing this plugin http://code.google.com/p/jquery-in-place-editor/ I have some minor problems with it. Currently to edit the element is by means of clicking on it. Now I want it edit it (change the label to text box) when I click the edit button on the right of the page. Is it possible? Thanks ...

Don't show hidden divs in wizard on page refresh?

I created custom wizard that uses hidden divs for wizard pages. Here is the demo and the source code. You will notice that on each refresh (F5 or ctrl-r) of a browser, divs with input boxes will be shown for couple of (mili)seconds. Is there a way to eliminate this effect? This question is connected with how-to-preserve-textbox-valu...

Centering images vertically

HTML: <ul> <li><img src="image1.png" /></li> <li><img src="image2.png" /></li> <li><img src="image3.png" /></li> <li><img src="image4.png" /></li> <li><img src="image5.png" /></li> <li><img src="image6.png" /></li> </ul> ... the images are all different sizes, I'd like to center them vertically. jQuery: $('ul li').css('p...