jquery

how to set character to big size without press capslock

dear all..i want my input form automatically make all character become big size.. and also without press a capslock button...i want all data which have been input into DB in capital format..what's code to make it? ...

Toggle Menu Off/On using jQuery

Hi, I currently have a menu within a div called mnugrp and would like to add the following functionality onto my web page that will the allow the user to either hide the menu ("Menu Off") or show the menu ("Menu On") With the main menu showing to start off with I want to be able to place this "Menu Off" item on the page, which would be...

How can I count the number of children of a DOM element?

I would like to determine the number of images inside a certain div. I am fairly sure I have the code to select the elements I would like to count: var imageCount = $("#work img").size(); And the div itself couldn't be simpler: <div id="work" class="shown"> <img src="graphics/gallery/001.jpg" /> <img src="graphics/gallery/002.jpg"...

How do you use the click event properly to call another function within the class?

Hi, I was confused on how to use the click event in order to call another function within the class. $.fn.imageareaselect(image) { this.click(function(){ $.fn.pinpointImage.add(image); }); } The selector that is passed into this function is an image. I wan't to make it so when you click the image it calls that function. ...

how to retrieve and show data using .click(function()

i have one textfield and one show button.. i want after i have been type some string inside textfield then click that button... i can show all information from DB.. what's code to do that?? $(document).ready(function){ var oTable; $("#show").click(function(){ var params=$("#myform").serialize(); $.ajax({ ...

Possible to pass multiple level data array using the data field of jQuery $.ajax ?

how do I pass multiple level array using jQuery ajax function? example of data to be passed: {"data": { "username" : "name1" , "password" : "password1" } } in bodyContent = $.ajax({ url: "somepage", global: false, type: "POST", **data:** , ... ...

Tags hovering like Stack Overflow using jQuery

How does stackoverflow does that hovering effect on a tag of a question? How to do the same using jquery? EDIT: Not that mouseover i want the submenu showing Add Jquery to favorite tags ...

JQuery draggable update array after delete

I'm not sure of the best way to do this, I am certain that my JQuery is "clumsy" to say the least but it gets the first part of the job done. I am dragging "products" to a basket like this: $j('#basket').droppable({ accept: '.productsimg', drop: function(ev, ui) { $j(this).append(ui.draggable.clone()); $j("#basket .de...

In jQuery, what happens when you have two .children() functions?

In jQuery, what happens when you have two .children() functions? var area = image.canvas.children('.image-pinpoint-edit').children('.image-pinpoint-edit-area'); Is it redundant? cant you just do image.canvas.children('image-pinpoint-edit-area') to get the inner children? ...

$(window).unload wait for AJAX call to finish before leaving a webpage

Basically, once a user leaves a webpage in my application, I need to call a PHP script with AJAX, which will insert a time spent on the webpage to the database and then leave the page. It is important to wait for the AJAX request to finish because webpages in my application are not accessible to users unless they have spent a certain ti...

preload images using jQuery

I got this snippet of code following a tutorial comment (by James) on Nettuts and I would like to implement it. The tutorial method of preloading images is long winded but I liked James' shortened version of this, however, I have tried implementing this and I am not getting it right. It seems I would need to set up my array first, the ...

Questions about handling data and error in $.ajax response

Hi guys. I'm using jquery and php for some async job. I'm using $.ajax with beforesend, complete, success and error. I made the async POST request to a php that execute some mysql query and return true (string "1" in fact) if all is ok and false (string "0"). Back to js I procedd the data return in the success function (or complete?). Sh...

Combining validation methods in jQuery Validation plugin with "or" instead of "and"

In the jQuery Validation plugin there are a couple of methods that do the same thing, but for different locales, for example dateISO and dateDE, that both validate date formatting. How do I combine these so that the input element accepts either? Let's say I have an <input type="text" name="dateInput" id="dateInput" /> in my form, and I ...

Jquery repeat function every 60 seconds

Using setTimeout() it is possible to launch a function at specified time, e.g.: setTimeout(function, 60000); But what if I would like to launch the function multiple times? Every time a time interval passes, I would like to execute the function (every 60 seconds, let's say). ...

jQuery looping through open dialogs to get/update position of each

I am trying to make the jQuery dialogs stay in their position relative to the window size, so for instance: if the original viewport width is 900px and there are 2 dialogs, one at 100,100 and another at 450,200 when the window is resized to say 1200px the first dialog would be 400,100 and the second at 750,200 I currently have this hand...

Auto username suggestions

Dear all, I m building a small web application.i have two text fields. UserName Location I want that when user enters any username by its own it should checl whether that username is available or not.If not available it should autogenerate list of usernames ,and by selecting that username it shuld get filled in username textbox.i wan...

parse javascript object returned from ajax as html

Result (data) looks like this: <tr> <td> Something... </td> </tr> <div id="paging">1, 2, 3... </div> This is ajax ... dataType: "html", success: function(data) { parse data... $('#myDiv1').html(data1); $('#myDiv2').html(data2); } ... Is it possible to parse data so that data1 contains table row(s) and d...

How do I make a flot chart use values from a database?

I want to bind the stacked bar chart with some database values. I've got it working using hard-coded values. How do I make it use values from a database? At present, I've got this code in a JavaScript file: $(function () { var css_id = "#placeholder"; var data = [ {label: 'Strong', data: [[1,250], [2,250], [3,250], [4,...

Javascript or jQuery to select a option in select element

Hi, I am wanting to automatically select the option with the value of fr. <select class="goog-te-combo"> <option value="">Select Language</option> <option value="fr">French</option> </select> Is this possible with javascript or jQuery ? ...

jQuery AJAX Form, cannot send array?

Hello, I'm practicing my jQuery skills (ok, learning too) and experienced an issue. I got a file upload form with file input. I'm using this plugin (http://www.fyneworks.com/jquery/multiple-file-upload/#tab-Uploading) to upload multiple files at once. So I'm using following form input: <input type="file" class="multi" name="photo[]" ac...