jquery

Making jQuery UI's Autocomplete widget *actually* autocomplete

I need an auto-complete in the app I'm working on and, since I'm already using jQuery UI, I'm trying to make its Autocomplete widget meet my needs. Step one is to make the search term only match at the beginning of suggested terms. I've already got that working, as you can see in the code below. Step two is to have the first suggestio...

JQuery - Custom function works once, then not recognized

So I got this code $(document).ready(function(){ $.fn.loadView = function(a){ }; $('#id').click(function(){ $.fn.loadView(); }); $.fn.loadView(); }); So when the code loads up the initialized $.fn.loadView() just fine the first time. But then when $('#id').click is activated I get this error $.fn.loadVi...

How do we find the row in the table which was changed

In the below table starting from <td>2</td> to the last everything is dynamic values from PHP. So each row contains the selectbox and the textbox which are dynamic. If any of the values are changed I should be able to get the row number such as "2" or "3" or "4" or so on which was in td how do i get that how do I create an array with t...

Jquery validate: Regexing a non-US phonenumber

I'm using this: jQuery.validator.addMethod("regex2", function(value, element, param) { return value.match(new RegExp("." + param + "$")); }); $("#phonenumber").rules("add", { regex2: "[0-9]+"}) to validate a phone. The phone number must be at least 7 digits long, the I got this regex from elsewhere and am using the parameter minle...

jquery conflict with identical scripts

I am using jquery to load content into tabs, and switch the tabs on click. My problem is that one one page I am using this "tab switcher" twice, and it is causing a conflict. I am not too experienced with jquery, so my problem probably lies in the fact that I am creating the function twice in the head. Here is my jquery (you will notice ...

How to get data out of JQuery getJSON callback

I need to get the JSON object data out of the callback function so that I can process it later in page, not within the callback as I am now. It must be obvious to everyone else as I can't see anything written about it. Can anyone tell me how to do it? Here is my code: <script type="text/javascript" src="/site_media/js/jstree/_lib/jquer...

Strange layout problem in IE6

URL: http://www.hkpete.com/test.html jQuery 1.42 jQuery Tools 1.2.3 overlay IE7 has this problem too (tested on ietester) I can not find where the problems lie. Thanks a lot. <div id="dialog-content"> <!--Login --> <div id="login" class="panel" style="display:none"> Login.................. </div> <!--Register -...

jQuery Music Player

Looking out to add some music in the background to my website, the way its done on flash website, so i need a music player with very small control panel which i can put at the bottom of the website to turn the music on or off, that's it. ...

how to get the id of all selected checkbox in jquery?

i have a checkbox who have class= check how i can get id of all checkbox in javascript ...

Case-insensitive switch-case

OK, so let's say I have this: $(function() { $('#good_evening').keyup(function () { switch($(this).val()) { case 'Test': // DO STUFF HERE break; } }); }); ... this would only run if you typed "Test" and not "test" or "TEST". How do I make it case-insensitive for JavaScript functions? ...

Understanding howto interact with ul li menu plugins

Im trying to devlop a jquery menu plugin, based on UL and LI tags. this is the really basic plugin: (function($){ $.fn.extend( { verticalfade: function(options){ var defaults = { speed: 'normal' }; var options = $.extend(defaults, options); return this.each(function(){ $(thi...

Comparing Sizes in jQuery

Hey guys, I'm currently learning jQuery, and I am curious about something. For functions that return sizes in strings, like say: $(".some-class").css("line-height"); // => "18px" Is there a way to compare them? For example, if I want to see if it's at least a certain size before doing something? I'm not actually planning on using th...

JQuery Autocomplete submitting the data while press return

hello I'm using JQuery Autocomplete (bassistance) and have run into a problem. if i select by pressing ENTER(Return key) it just displayed in the text box and i need to press one more enter to search (submit the form) is there is any way to make the form submit on single select.... ...

how to show progress immediately using ajax?

I have a demo using jQuery ajax to invoke web service,at the same time,another of a request shows the progress. Why it not show progress immediately, while the last to show all the progress. The code like this: WebService.ashx(c#): public class WebService : IHttpHandler { public void ProcessRequest(HttpContext context) { ...

Override default jQuery selector context

I'm trying to use jQuery inside a Firefox extension, and actually want to use jQuery to manipulate the DOM of the current page, as opposed to the context of the XUL file. Thus, I load jQuery in my XUL file, and pass it to some of my scripts in a sandbox (using the Greasemonkey extension compiler http://arantius.com/misc/greasemonkey/scri...

Sliding text overlapping

Hi. Having a slight issue with a slider plugin for Wordpress I am creating. I'm trying to get the text to slideUp at the beginning and slideDown just before the transition to the next image. This appears to work fine however after a few transition the slider that fades (top one) text starts to overlap; the text from the next image shows ...

jQuery .load : Response ok but content not loading

I'm using jQuery with CI for loading a view in this tag: <div id="browseresults"> </div> This script is placed after the </body> tag: <script type="text/javascript">//<![CDATA[ jQuery.noConflict(); jQuery(document).ready(function() { //Load the results view jQuery('#browseresults').load("<?= base_url() . $th...

PHP/JSON/jQuery - JSON response from PHP script being enclosed in <head></head><body> ... <body>

I am trying to debug a simple PHP/JSON/jQuery problem. the following PHP script: header('Content-type: text/javascript'); echo json_encode(array('type'=>'error','message'=>'arg')); is being consumed by jQuery but when the line: var results = jQuery.parseJSON(responseText); is executed, the jQuery JSON parser gives the following: ...

define actions for li item

I wont to perform action for the clicked li, as for expample toggle the nested ul this is the html <script type="text/javascript"> $(function() { $('#verticalfade').verticalfade(); }); </script> <div id="verticalfade_container"> <ul id="verticalfade"> <li>Le Collezioni <ul> <li>Link 1</li> ...

Jquery - Multi array and each

Hi, i have a problem with the each function. HTML <div id="d1" class="line1"></div> JS $(function() { tt = new Array(); tt['id_32'] = new Array("32", "gudfgws", "htdfgss", "0", "gudfgdgfs", "0", "halder", "0"); tt['id_35'] = new Array("35", "TVdfg.xml", "154", "Was läuft jetzt im TV", "0", "simpsons", "0"); tt['id_36'] = new Arr...