jquery

Multi language for a Website (php and javascript)

Hi, i try to build a language selection for my Website. I use php and Javascript. My idea is to create for every language a php file. For example: lang_en.php <?php $lang = array(); $lang[1] = "Everything is ok!"; $lang[2] = "Please select a Number."; ?> <script language="JavaScript" type="text/javascript"> lang = new Array(); ...

Jquery slide down and up with arrows

I am trying to figure out a simple way to use jquery to have a list of 5 items and then hit an arrow down and it shows 5 more items and so on and so on. If the up and down arrows fadeaway when it reached the top and bottom that would be a plus. Any help would be greatly appreciated. ...

make a simple login page

hey all.. i want to make a simple login page. I have prepared two textfield. <input type="text" id="user"> <input type="password" id="password"> <input type="button" id="go"> i want after click #go script can check: if #user value != "admin" then #password value != "qaubuntu" will show and JS alert. but if data same, will show som...

jQuery treeview wont work in async mode

Hi, ive downloaded a treeview plugin for jquery (from http://jquery.bassistance.de/treeview/) and ive got a problem with it, because it doesnt generate anything visible. Ive generated a json string with php: [{"text": "RSS feed"}, {"text": "Documents", children: [{"text": "test.txt"}]}, {"text": "Todo lists"}] The jquery code lo...

Jquery validate depend field

Huy Guys, I am trying to use jquery validate and specify that one field is required only when 3 other fields are blank. the thing is that the rule is working but it still remain requiring the field even when I type value on it. Thanks. This is my code: $("#ProspectDtlFrm").validate({ rules: { prsptEmail: { required: function(...

How to change the target of any local link when clicked, using javascript / jquery?

I need to change the href of any local link when it is clicked on. I've worked out how to select the correct links and create the new url, but not sure how to change the location. I need to be certain that any other click events have also run, so I can't just change the location immediately. var my_host = 'example.com'; $(document).clic...

jquery selector needed to select all certain children of parent

Hi, I have a page with some tables on it. In each table the first row is normal but the rest of the rows have a class of hidden so that they are not displayed on load. In one of the cells on the first row of the table there is a link to click to view more details (fade in the hidden rows of that table). I'm struggling to get this to work...

Acessing a JSON object using jQUery

Hi guys, I am trying to access a jQuery JSON object, and I can't see anything wrong witj my code, but all I get when I try to access the object is undefined, I was thinking that maybe it's because of the way it is nested, but I am unsure, here is my code, function systems(dom_id, id){ $.getJSON("get_systems.php", {uid:id}, function(d...

jquery plugin: multiple call to a function, passing different parameters

Hi everyone, I've got a tricky problem. I've made a jquery Widget plugin : $.fn.Widget=function(id_place,id_event,options){}; I call it once when the page is ready : (specifying that I want a last sorting) $(document).ready(function() { $('#mydiv').Widget(13,50,{"sort":"last"}); }); But in this plugin, I generate a little ...

jQuery selector needed to select all 'p' tags in a table row

Hi I have some tables in my page. The first row of each table is normal but the rest of the rows are hidden by giving the tr tag a class of hidden. There is a link in the first row to show more info (fade in the hidden rows) which currently uses this selector: $(this).closest('tr').nextAll("tr.hidden").fadeIn() However within the hidd...

Z-INDEX Problem in IE7

If you click the orange ORDER button at the top the #dimmer should cover the whole background and the form should appear at the top. (lightbox-like effect) The problem is that in IE7 the #dimmer would appear at the top regardless of it's z-index. In other browsers everything works nicely. Link: http://fenelon.ru/projects/SpaceFood/2...

Jquery remove/append item from multiple select to multiple select

Hi, I have 3 multiple selects. In the first Select1(left) I load a group of modules. In the 3rd Select3(right) I load another group of modules. The user can select from the Left and hit an add to remove the item from the Left and append it to the Select2(Middle). The user can do the same with the Right, select items hit a different add...

Ajax form not working (jQuery - PHP)

jQuery: $("#contact-us-form").submit(function () { var nameVal = $("input[name=name]").val(); var companyVal = $("input[name=company]").val(); var titleVal = $("input[name=title]").val(); var emailVal = $("input[name=email]").val(); var phoneVal = $("input[name=phone]").val(); var messageVal = $("input[name=messa...

JQuery Draggable and Sortable placeholder

Hi everyone, I am facing a particular issue with combining draggable and sortable. The problem has to do with a placeholder not showing when a draggable is moved over the sortable and the drop is not "recognized". This behaviour occurs when the sortable ul hs NO height defined in css. When i do define a fixed height in css for the #Sor...

jquery $(document).ready() queue order

Hi, I have a page index.html that extends base.html (django) and each of them has a $(document).ready defined. Now, I was expecting the one in base.html to go of first, but I was wrong, the one in index is first and the one in base.html starts after. I guess this is because index finishes loading before base, and not some default behavio...

JQuery UI Sortable: Toggle all portlets when created?

I am referring to the portlet example here All the divs of the class 'portlet-content' are displayed when the demo starts. I am trying to get them to collapse when the page loads, and I tried this: $('.portlet-content').toggle(); Inside the document.ready(). However this doesn't work. However, if I enter the statement above using th...

Remove jquery datepicker from a html control

I have a datepicker on a textbox txtDate. I need to remove the datepicker, if a particular checkbox chkBox is checked. And to reapply the datepicker if the checkbox is not checked. I tried making the textbox readonly, but datepicker is still working. How to do this. EDIT: On the same checkbox event, I also want to make a select (drop...

cross-browser async uploader?

Anyone looked into this recently? 12 months ago i was using Uploadify 6 months ago i switched to Plupload which was the best i could find, what are people's thoughts, is Plupload still the best uploader for multibrowser async image uploads? I'm about to start a new site... ...

jquery form plugin: how to catch server errors

Hi I'm using the jquery.form plugin, it works except that I can't catch server errors. Even when I'm using the 'error' option, it doesn't seem to catch anything. For example, if the server returns a 500 error code, it will still says 200 code, which means 'Ok'. So I can't do handle the 500 response at all. What's happening? //Define a...

Can a jQuery load event fire when adding a dynamic stylesheet in Firefox?

I'm running the following code in jQuery to dynamically load a stylesheet. Its purpose is to allow users to load a custom stylesheet and change the look of a JavaScript widget: this.loadStyleSheet = function(url){ $("<link rel='stylesheet' type='text/css' />").attr("href", url).appendTo("head"); } For a split second the screen app...