jquery

Show/hide nested rich:subTable in rich:datatable

I've nested a subTable inside a dataTable as follows: <rich:dataTable value="#{myBean.dataList}" var="dataItem" > <f:facet name="header"> <rich:columnGroup"> ...

jquery and user city

I have another question: when user selected dynamic tab its swapped image. How to save user made changes in SQL or maybe in XML file :) How JapanPro wrote $.post('sendData.php', function(data) { $('.result').html(data); }); it can be solution. But someone can show example for sendData.php Maybe: <?php $packed = $_GET['data']; ...

Select-box control with jquery

I am using a selectbox: <select name="priority" id="priority"> <option value="4">Low</option> <option value="3" selected="selected">Normal</option> <option value="2">High</option> <option value="1">Emergency</option> </select> When user select "Emergency", then a confirmation box opens and if user confirm, then "Emerge...

Halo reach stats api?

Hi guys, Can someone please give me an example of how to access the Halo: Reach stats API using jquery ajax? Here is an exert: GetGameHistory(System.String, System.String, System.String, System.String) This function is used to browse through a player's history of games. Parameters identifier: Your application's ide...

Avoiding repetition when using callback functions and asynchronous requests

I am writing some Javascript/jQuery code that requires me to make lots of requests to various APIs. I have come across this problem many times and this is just a basic example of one instance of it. The code makes an asynchronous request to a server and then if a condition with the returned data is not met, the code makes another reque...

Jquery - Parent Selctor (closet)

Hi, i try to select a class which is the parent from a parent. Can somebody help me? js <div onclick="$('.al_head.tt_this).closest('.aledmsg').remove();" style="cursor:pointer;"> TEST </div> html <div id="albox"> <div class="al_head" style="margin-bottom: 5px;" id="alss"> <img src="bt.png" alt="se"> <div style="float:...

Fade in divs one after another.

Hey there guys, Im good with HTML and CSS but have only jsut started to scratch the surface of jQuery. I'm looking to make 3 divs fade in on page load one after another. So far I have this <script type="text/javascript"> $('#1').hide().fadeIn(1500); $('#2').hide().fadeIn(1500); $('#3').hide().fadeIn(1500); </script> I hear...

Selecting the last child

Hello all, I was wondering how I'd get an alert of a last child by clicking a link. <h3 id="comment:5" class="myclass"> This is how far I got: $('#lastcomment').click(function() { alert('Handler for .click() called.'); }); My aim is to jump to the last comment by clicking the link. An alert would be fine for the first step I...

Keyboard Navigation to load pages

Hi, is there a quick way to use the right and left arrow keys to load the next page? My solution so far is: $(document).ready(function () { $("a.transition").click(function (event) { event.preventDefault(); linkLocation = this.href; $("body").fadeOut(20, redirectPage); }); $("a.transitionB").click(f...

cakephp chain select in form with special conditions

hi My form application calls for 2 chained select boxes with special conditions, and I'm using cakephp 1.3 to build this application. The hierarchy and order of choices for the sections is this: 1 - hotel 2 - roomtype the hotel has limits of how many visitors can be in each room The relationships are: customer hasOne hotel->roomty...

Is it faster to refer to jQuery objects (mostly DOM objects) by the variable name only, or by $?

To put it simply: Is this: var x = $('#selector-id'); x.slideDown(); Faster than: var x = $('#selector-id'); $(x).slideDown(); ...

Detect if jQuery plugin is applied to multiple elements?

I'm working on a jQuery plugin that can be applied to multiple elements. The plugin includes some animation effects and I need to manage the event queue based on if the plugin is used on multiple elements (instead of one). What's the best way to detect if the plugin has been applied to a single element or to multiple elements? Edit... ...

jQuery disable all button of a css class

Hi, I have n buttons. This button has the same name: setAlg. I would disable all the buttons that has this name. I have tried $("input[name='setAlg']").attr("disabled",true); but it doesn't work. How I can do? Thanks a lot. ...

jquery selecting/unselecting checkboxes in children/parent <li>

I have the following <ul> <li>Main <ul> <li><input type="checkbox" onclick="$.SelectChildren(this);" /> parent 1 <ul> <li><input type="checkbox" onclick="$.SelectChildren(this);" />sub 1</li> <li><input type="checkbox" onclick="$.SelectChildren(this);" />sub 2 <ul...

jQuery changing data format from string

Hi, I have this string: 2010-09-21T15:48:12.754+02:00 I would transform it in this format: Tue Sep 21 15:48:12 CEST 2010 How can I do it with javascript or jQuery? Thanks a lot. MP. ...

select hidden input in div, unable to find; however source shows input tag in div

this is what the page looks like <div id="DivID"> <input type="hidden" id="Hidden1" value="Value1" /> <input type="hidden" id="Hidden2" value="Value2" /> <bunch of other tags> </div> When I do $("#DivID").find("input#Hidden1").val() I'm getting undefined. However when I $(":input#Hidden1").val() I'm getting Value1 Invest...

something wrong with this jquery?

There is a debugging syntax error, but I can’t see it! im a bit of a newbie, so excuse my code!! $(document).ready(function(){ /* fetch elements and stop form event */ $("form.follow-form").submit(function (e) { /* stop event */ e.preventDefault(); /* "on request" */ $(this).find('i').addClass(...

IE ajax interrupting issue

I am experiencing this issue with IE7 but not in Chrome or firefox: I have several page elements that are loaded via ajax. This elements are dynamically displayed on the page as hyperlinks to another page. As I have many such elements loading, I can sometimes see the progress of the page load (i.e. I can see the elements getting popula...

Ajax with jQuery

Hello! I'm very new to jQuery and AJAX. i read a bit of the API provided by jquery on their website which said : Example: Alert out the results from requesting test.php (HTML or XML, depending on what was returned). $.post("test.php", function(data){ alert("Data Loaded: " + data); }); Now,i'd like to know how exactly test.php re...

[JQuery] creating new fragments with class and id behaves strangely in IE8

I have this piece of code which works in Firefox link = $('<a>link</a>'); var name = $("<h3 class='name section'>").append(link); $('#container').append(name); However this doesn't work in IE8. It seems that name doesn't get created at all. I tried adding console.log('class of name'+name.attr('class')); and inside the Developer Toolba...