[jQuery] jScrollHorizontalPane unpredictable browser issues
Hi, I've been trying to get jScrollHorizontalPane (a scrollbar replacement plugin: http://plugins.jquery.com/project/jscrollhorizontalpane) to work cross-browser for the last few days but my efforts have yielded unpredictable results. I have managed to get custom scrollbars working in MSIE 6 & 7, Safari, Chrome and Opera. Firefox is the main browser left to conquer but I just can't get them to work! The plug-in inserts code into the page correctly (it wraps the element to be scrolled in an div class="jScrollPaneContainer"),
[jQuery] Validate plugin - help with name vs Id for rules; checkbox in strange format
hi first, I want to say how cool this validation plugin is, very slick - especially like the eager validation aspect. I use CakePHP, and I am trying to check a "terms" box is checked, but CakePHP outputs the HTML like so: <div class="input checkbox"> <input id="CoverAgreed_" type="hidden" value="0" name="data[Cover] [agreed]"/> <input id="CoverAgreed" type="checkbox" value="1" name="data[Cover] [agreed]"/> <label for="CoverAgreed">do you agree to the terms?</label> </div> because of the names being
[jQuery] Simple page navigation problem
Hey, I'm sorry i don't have a live example to show, but ill try explain my problem as best as possible. Here is the full piece of code: $(document).ready(function(){ $('#mainDiv').load("Home.html"); $('li.home').click(function() { $('#mainDiv').load("Home.html"); }); $('li.about').click(function() { $('#mainDiv').load("About.html"); }); $('li.products').click(function() { $('#mainDiv').load("Products.html"); }); $('li.tech').click(function()
[jQuery] ajax async:false timeout
Is jQuery possibility to use $.ajax post webservice and return some data with both Properties timeout and async:false ? I try to set timeout:300, but only when async:false it will alert "timeout"
[jQuery] Viewing XHTTPRequests in Opera
Hello, where can I find a Tool to View the XHTTPRequests in Opera, like I can using FIrebug? Thanks for your Help, Stefan Sturm
[jQuery] how can i check div background color
this is not wworking if($("#mydiv").css('background-color')=="red")
[jQuery] can't check background-color
how can i check my div background color? that condition is not seem valid.... if($("#mydiv").css('background')=="red")
[jQuery] onclick change class to new class
Hello All, I have a CSS list that I use as my navigation. Each LI has a background image as the base and a a:hover image for roll over. Within the LI item for the navaigation I have a ahref that is used to fire off some jquery function. All this works....now I want to change the LI item to another css class if it clicked. I have tried this: $('#gt').click(function() { $(this).removeClass("gt"); $(this).addClass("gt_active"); }); But that doesn't work :-( Here is a sample of the complete code: HTML
[jQuery] Multiple Events
I am trying to show and hide a div once some data is processed by the php.but the second event is not working.What am i doing wrong? $(document).ready(function(){ //alert("Document is Ready"); $("form#FormID").submit(function(){ //alert("Form is submitted"); $.post("process.php",{keyword:$("#keyword").val()},function(data) { //alert("Data Loaded: "+ data ); $("div#display-div").html(data).show(); }); return false; });
[jQuery] jcarousellite: add class to btnGo/external control on click of next or previous
my carousel has both external control and next/prev arrows. i would like to be able to add a class to the external control that corresponds with the visible li. this is how i'm building my navigation links: // build links $('.carousel ol').each(function(i){ var carouselNavDivs = $('ul.nav-carousel'); $(carouselNavDivs[i]).append('<li> # previous </li>'); $(this).children().each(function(j){
[jQuery] BlockUI: unblocking when clicking in the darkend area?
I want the darkened area that when clicked, it restores the UI (unblocks it), what's the best approach? It seems like something like this would work, but doesn't... $('.blockUI').click(function() { $.unblockUI(); }); Thanks for any help...
[jQuery] jQuery POSTing to Itself
I have a button that, when clicked, POSTs to a PHP document. Right now I'm just interested in knowing the PHP is called at all, so I just have it call a dummy INSERT statement as evidence it worked. $(document).ready(function() { $('.modalSave').click(function() { var id = GetIDNumber(this.id); // all of my IDs are in the form [className]_[ID #] var myStr = 'helloworld'; $.post('backend.php', {
[jQuery] jqModal IE window hiding behavior
Good Day. Been using jqModal in a number of sites and my latest implementation is making IE 6 and IE 7 behave funny (works fine in FF2.x). You click on the link and the modal window (iframe) starts to load just fine, but as soon as the page (of the iframe) is fully loaded, IE's window moves to the back of all the windows. So, if I'm looking at the site in IE, and FF is behind it...that is FF is between IE and the desktop, as soon as the iframe content loads, IE moves behind FF, but it retains it's
[jQuery] JQuery Cycle + lazyload
I am using cycle for a slideshow and it works great. The problem is that I have a gallery with about 60 large images and it can be a real pain for slow connections. I figured using lazyload would be a good option so that the images only load as needed. I can't seem to get cycle and lazyload to work together - any thoughts? I have the development online at http://www.megperotti.com/weddings/index_weddings.php Thanks everyone, TR
[jQuery] event handlers on appeneded code?
Hi to everyone I am having problems with appended code generated from an ajax post request. The code is appended correctly, but the problem is that the anchors in the appended code do not work. The ancors should return false and should work with a jquery function but they don't don't and clicking on them the user goes directly to the url in the href tag. I guess it's something to do with DOM... but I can't make it work $.post("script.php", { param1: value1, param2: value2 }, function(data) {
[jQuery] Removing CSS files from DOM (IE6)
So I thought I would be a bit tricky with this CMS we have at work and remove some of the rubbish CSS style sheets that it spits out. jQuery to the rescue. var cssRemove = "limbo.css"; $("link").each(function(){ if ($(this).attr("href").match(cssRemove)) $(this).remove(); }); Only to my dismay, I realize that this solution doesn't work in IE6. I trolled through the Interweb but couldn't really find any working solution so decided to give it a bit of a whirl and this solution
[jQuery] Use submit event, but don't refresh page.
Now, I know that I could do this with the jquery form plugin, but I am needing to write a smaller script, and I wanted to learn as well. I have a form that I would like to submit using ajax. This is all fine, and I can get this working perfectly. But, there are some functions on the page that get called onsubmit, so I somehow need to trigger the submit event, but I don't want to refresh the page, I still want it to send using ajax. Any ideas how this is possible, and how the form plugin does it?
[jQuery] Need help !!! $.preloadCssImages is not a function
I'm getting the following error via FireFox? Error Plugin (also IE errors): $.preloadCssImages is not a function I want to preload all of my images. I cannot locate the solution. I've tried everything !!! Please visit my test page: http://www.naturalskinsolutions.com/test.htm Source files: http://www.naturalskinsolutions.com//src/js/jquery/jquery.min.js http://www.naturalskinsolutions.com//src/js/jquery/preloadCssImages.jQuery_v4.js I've downloaded the most recent versions of the necessary files
[jQuery] Adding a variable within a function name?
I am using the jquery each() function to find the id of text areas on my page. Then I need to add that id next to another function, but I am getting syntax errors: $('textarea').each(function() { var textId = $(this).attr('id'); $(this).val(); = eval('editor_' + textId + '.getHTML();'); }); Am I right in using eval to add the id? Or am I going about this the wrong way?
[jQuery] Galleria Thumbnails not generating in Firefox
Can anyone please explain why in FF the thumbnails are displaying as full images and the main image is not displaying at all. Works fine in opera and safari. Link: http://cmphotographer.com.au/category/wedding/
[jQuery] Getting jQuery to recognise the addClass function
I'm trying to create a page whereby the user can click on an element (in this case, a list item (<li>)) to cycle through differnet css classes. I'm using the removeClass/addClass function to swap the class (which is successful), however I want to then use new class for a different removeClass/addClass function (which is unsuccessful). Below is the code. It should seem fairly obvious what I want to achieve. $(".class1").click(function() { $(this).removeClass("class1"); $(this).addClass("class2");
[jQuery] How to call a function directly that is normally an event.. ?
Sorry, I don't know how to summarize this problem so I'll just post code. Let's say you have this: $('#myID').click(magicFunc); magicFunc looks like: function magicFunc() { $(this).fadeOut(); } Now, let's say I want to invoke magicFunc on a certain item MANUALLY, via code, not through a user-driven event. e.g.: (I know this is wrong) $('#myID').magicFunc(); I don't want to make a plug-in. I just want to somehow make the $ (this) reference in magicFunc() refer to whatever I pass into it. Is that possible?
[jQuery] Change the active tab of jquery ui tabs
Hello, I was wondering if it's possible to change the active tab. When you load a page he will always show the first tab as active. Is it possible to change the active tab. For example on the index he shows the first tab as active, thats fine. When i go to users.php he has to show the User tab as active. How can i fixed this? Erwin
[jQuery] how to bind a form to json data
hello, I know how to make a form return json, but how can I bind a form to json, so that all textfields, selects etc. show the correct value? <form> <input type="text" name="id"> <select name="choice"> <option value="one">one</select> <option value="two">two</select> </select> <form> then I get from somewhere <pre>[{"id":1,"Choice":"two"}] Then the form should get into this state: </pre> <form> <input type="text" name="id" value="1"> <select name="choice"> <option value="one">one</select> <option
[jQuery] Use JSON from .post
Hi, I have just started using jQuery and am trying to get data back from a mysql database in json format. I am using PHP to query the database and returning it with the json_encode method. (Basically I am following the example in the documentation - http://docs.jquery.com/Ajax/jQuery.post#urldatacallbacktype ) The problem I am having is that the example only returns one json object rather than an array of them and I'm not sure how to modify the calls to either the php encode json or how to access
[jQuery] Problems with .load or something
I wonder if anybody can give some advice on this. I am not too experienced with asynchronous code. I am trying to load information from other pages on our website onto the home page, for a "recent projects" list. I want to be able to supply a simple list of names corresponding to web pages and this script is supposed to go to load the the first H1 tag and first image from each page and package them in some HTML which I define with the "template" variable. The thing is, sometimes it works and sometimes
[jQuery] disable all element in a table?
hi, i have a table which has elements in it, input, dropdown, and i want them disabled at certain times, can i do this is jquery? any examples? suppose table is like: <table cellpadding="0" cellspacing="5" border="0" id="testTable"> <tr> <td class="Column"> Phone: </td> <td class="Column"> <input name=TextBox1" type="text" id="TextBox1" /> </td> <td class="Column"> Type: </td> <td class="Column"> <select name="DropDownList1" id="DropDownList1"> <option value="Op1">Op1</option> <option
[jQuery] Validate. Can validate plugin do this?
Hello, I have a form with 20 elements a Submit Button and a Validate. It works fine ... Inside this form I added the following: - a select, an input and 3 checkboxes all with same name; - a button named Add; - an ordered list. When the Add button is clicked the values of the select, input and checkboxes are added to the list as list item. Note: When the Add button is clicked it does not submit the entire form $('#Add').bind('click', function(){ // logic done here } Can I add validation functionality
[jQuery] closing tag bug in jQuery 1.2.6?
Has someone else already posted this bug? The following code shows jquery failing to detect the termination of a tag. Load the page and click on the word login. The selector should find the empty div and display the html content (nothing). Instead shows the span closing tag and the javascript that follows. <html> <head> <title>jQuery bug test Page</title> <script src="script/jquery-1.2.6.min.js" type="text/javascript"></ script> </head> <body style="background-color:black"> <span id="Login" style="position:absolute;
[jQuery] [validate] Ignore hidden form fields from the validation
Hello! I am currently hiding or showing specific form fields depending on specific conditions. Only if the field is hidden they are still used to validate against when submitting the form. Are there any ways to ignore any field validations when the element is hidden? Because when the field is hidden it doesn't have to be filled in. Any way to solve this? I am currently using code like this: $("#question_2").click(function() { var itemValue = $("#question_2").val(); var toggleItems = $("#field-question_11,#field-question_12,#field-question_13");
Modification wanted fot the jQuery SlideViewer 2
Hello ! I'm new here, and I'm new to web-design. I am constructing a website for multiple purposes and one of them is to show pictures I've made. For that reason, I would like to use a good and user-friendly Image Gallery. So, I found the slideViewer. The thing i like about it, is the possibility to scroll the images when you click on the image. No stupid buttons, just click it, and the next image will be visible There is one problem... Actually, I think it would be better that the navigation buttons
width() immediately after div creation fails [kinda solved]
Given is the following code and a HTML file with a <div id="container"></div> and an CSS file with ".class { width: 200px; }": $(function () { var a = $('<div/>') .addClass('class') .appendTo($('#container')); alert(a.width()); setTimeout(function () { alert(a.width()); }, 0); }); The first alert() reports a width that doesn't take '.class' into account, it reports almost the full browser width (Using FF 3). The second
[jQuery] Hiding and Showing Elements on a page with mouse over
Please can someone help me toggle page elements. I have some elements on a page and if they have a class of edit I am wrapping some edit tags around the element and hiding it when the page loads. For example:- <div id='blurb_7' class='edit'> Some Text </div><!-- end of blurb_7 --> At run time gets changed to:- <div class="admin"> <div id="blurb_7" class="edit"> <a class="modal" href="http://website/element_control/edit/blurb/ 7/1">edit</a> <a class="modal" href="http://website/element_control/del/blurb/
[jQuery] Strange AJAX + jquery refresh problem
Hey folks, i am really getting desperate here. I use jquery (current version) with RoR 2.0. Now i have a problem with a login-mask for users. I fetch and submit typed in username and password like this: -------- CODE ---------- jQuery("#index_login_submit").click(function(event){ jQuery.ajax( {success:function(request){$('#login').html(request);}, url:"/authentication/login", data:"user_name="+jQuery('input[@name=user_name]').val() +"&password="+jQuery('input[@name=password]').val(), async:false});
[jQuery] datePicker with rjs (on rails)
Hello folks, I'm struggling with datePicker when I need to load it within a RJS file. Basically I have a drop-down menu and according to the selected value I display some form fields (rendering a partial for selected value within a RJS file); one of those has to be the datepicker but I can't correctly load it. the rjs looks like ... @tasks.each do |task| page.insert_html :bottom, :tasks, :partial => 'tasks/task' end ... and the partial looks like <% fields_for "project[task_attributes][]", task do
[jQuery] Select an element in an ancestor selector
Hello guys, I'm in a big trouble trying to create a simple jQuery function, and my boss is "on my neck" asking when I'll be done with this work... I need help!!! My HTML is: <li><a class="apImg"></a> <div> <form> <ul> <li> ... </li> <li>... </li> <li><a class="confirmar">CONFIRMAR</a></li> </ul> </form> </div> </li> When I click "<a class="confirmar"></a>" it should add and remove a class to the "<a class="apImg">", which is located right next to the ancestor "li" on the code above. This piece of
[jQuery] Some help with adding form elements to dom in array notation
I have a form that contains input elements whose name is in the array notation e.g.: <input name="example[news][1]" .../> <input name="example[news][2]" .../> ... I use jQuery to dynamically add new input elements to the dom by copying the previous element. However, that leaves me with the following: <input name="example[news][1]" .../> <input name="example[news][2]" .../> <input name="example[news][2]" .../> ... I want the last number in the array notation to add to the previous one, so it SHOULD
[jQuery] load() and sortable()
Hi everybody, I can't load content from a page and use sortable afterwards ! The problem lies in the 'afficher_rubriques' function. When content is loaded (unordered list <ul></ul> with id="rubriques") I whish to use sortable. But nothing happens. I have to use my function sortable with a click action on a button to enable. How should I do ? Here's my code : <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type"
[jQuery] text after a radio button
Working with Lotus Notes developer - apparently, when building a form with radio buttons elements, Lotus automatically puts the value in text beside the button. He says there is no way to override this. So we get: <input name="joe" type="radio" value="1" />1 <input name="joe" type="radio" value="2" />2 <input name="joe" type="radio" value="3" />3 <input name="joe" type="radio" value="4" />4 <input name="joe" type="radio" value="5" />5 I said maybe we can hide that text with jQuery, but I find that
[jQuery] Event.target is Parent Child in IE but in Firefox it is child Element
I have used Hover Event When I try to get event.target.id, I get the inner child element in Firefox but in IE I get the parent element in IE. The example is at http://tradeera.com/sapphire/ ? Is this a bug or some mistake from my side? Thanks in advance CSJakharia
Next Page