In the code below, how to get the values of multiselect box in function val() using jquery or javascript.
<script>
function val()
{
//Get values of mutliselect drop down box
}
$(document).ready(function() {
var flag=0;
$('#emp').change(function() {
var sub=$("OPTION:selected", this).val()
if(flag == 1) $('#new_...
I'm trying to load jqtouch on-demand like so:
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript">
$(function() {
$.getScript("js/jqtouch.min.js", function() {
$.jQTouch();
});
});
</script>
Firebug outputs: $(_3c.selector).tap is not a function
If I inc...
I'd like to set up a drag'n'drop list inside a modal window. The window's content is loaded via an AJAX call, so I believe I need to use jQuery's .live() method.
Here is my current code:
$('#cboxLoadedContent').live('load', function() {
// Event for sortable page lists
$('ul#pageList').sortable();
});
How can I set up binding...
I am returning a JSON object (as a String) through a servlet. The JSON object looks like this:
{"3":"Martin Luther","30":"Boris Becker","32":"Joseph Goebels","19":"Leonardo Da Vinci","31":"Adolf Hitler"}
My jQuery looks like this (the submission of data is correct because I get a proper looking result from the servlet):
$.ajax( {
...
Hi,
Let's say I have this
$(document).ready(function() {
var array = $.makeArray($('p'));
$(array).appendTo(document.body);
});
});
<p>how</p>
<p>are</p>
<p>you</p>
<p>baby?</p>
If I want to replace <p> with <li> and expected output is ...
<li>how</li>
<li>are</li>
<li>you</li>
<li>baby?</li>
What should I do? Thanks i...
Hello, i have this html menu:
<ul id='main'>
<li class='active current' id='lighty'>
<a href='/'>Lighty</a>
<ul>
<li class='sub'>
<a href='/'>Hem</a>
</li>
</ul>
</li>
<li id='community'>
<a href='/community'>Community</a>
...
I want to have a event that only triggers when you press space and move your mouse at the same time. How can you make that?
...
I'm looking for help destroying a nested resource in Merb. My current method seems near correct, but the controller raise an InternalServerError during the destruction of the nested object.
Here comes all the details concerning the request, don't hesitate to ask for more :)
Thanks,
Alex
I'm trying to destroy a nested resources usin...
I want to sort results set first based on one column and then based on second column. I know how to do it on server side. And then I want to show these results with pagination feature.
Question: would it be better to do it on client side via ajax in jQuery? I'm using Zend Framework. Would Zend_Paginator module be useful in this scenario...
Hello,
By using the pattern from here, I want to check while a user fills in the #id_phone text input field, if it is matching to the pattern, use the value of #id_phone to fill #id_new_phone's value.
This doesn't seem to work for me.
$('#id_phone').change(function() {
var myPattern = new RegExp(^0\(5\d{2}\) \d{3} \d{2} \d{2}$);
...
i m using jQuery tablsorter plugin, it's working perfect,but now problem is ...
i want to enable sorting only on 1'st and 3'rd column, and i also want to show different color of alternate row. i used widgets:[zebra], but using widget zebra, it enables sorting on all column as well as images(asc.gif,desc.gif,bg.gif) is also appearing on ...
Hi,
I have the following text input on a budget calculator form which displays the final balance...
<tr><td align="right"><b>Balance: £</b></td><td align="left"><input type="text" class="res" name="res" id="res" size="10" readonly="readonly"></td></tr>
How do I go about setting the background of the input to red using css and j...
I'm currently using TinyMCE edit in my drupal-website, problem is that beneath the editor, some of the table is sticking out. If I remove the height set by javascript with firebug, it looks fine, even after resizing.
So I want to remove the height with JS, I've put this function at the end of my page:
$('table#edit-body_tbl').removeAt...
Hi I want to create a JSON array.
I have tried using:
JSONArray jArray = new JSONArray();
while(itr.hasNext()){
int objId = itr.next();
jArray.put(objId, odao.getObjectName(objId));
}
results = jArray.toString();
Note: odao.getObjectName(objId) retrieves a name based on the "object Id" which is called objId
However I get a v...
I am looking to sort my divs horizontally in a container div. I found an example on JQuery website but that is vertical sorting. I want it horizontal.
I want to do it sorting in #sortable Div.
Will you please guide me how can I convert this vertical sorting in horizontal manner.
CSS
<style type="text/css">
#draggable1 { width: 15...
I want the text in one of the columns of a table to not wrap, but to just truncate so that it fits within the current size of the table cell. I don't want the table cell to change size, as I need the table to be exactly 100% the width of the container.
This is because the table with 100% width is inside of a positioned div with overflow...
What is more viable to use:-
Javascript Libraries: YUI, jQuery, ExtJs
OR
UI Programming tools: GWT, ExtGWT, SmartGWT
It has become very difficult to choose between them as they are constantly increasing their capabilities to meet newer requirements.
We all know the power of jQuery in UI manipulations. The latest news from Micro...
Hai this is my jquery function,
function getRecordspage(curPage, pagSize) {
$.ajax({
type: "POST",
url: "Default.aspx/GetRecords",
data: "{'currentPage':" + curPage + ",'pagesize':" + pagSize + "}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(jso...
Hi,
I'm using jQuery to dynamically add new divs containing a few fields.
I'm adding new tunes in this example of output:
<div id="uploadedTunes">
<div class="tune">
Title:<input type="text" name="Title">
Length:<input type="text" name="Length">
</div>
<div class="tune">
Title:<input type="text" name="Title">
...
Consider my parent div is parentDiv and it contains five child divs
<div id="parentDiv">
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
</div>
How to empty the child elements parentDiv using jquery....
EDIT:
What is the diff between empty() and remove()? what should i use?
...