[jQuery] Script not recognizing class
Hey, I am absolutely puzzled and am hoping some of you may be able to help me: I have the following HTML: <ul id="imagenav"> <li > <a href="image_01.jpg" title="1" class="current" class="notloaded">1</a></li> <li > <a href="image_02.jpg" title="2" class="other" class="notloaded">2</a></li> <li > <a href="image_03.jpg" title="3" class="other" class="notloaded">3</a></li> <li > <a href="image_04.jpg" title="4" class="other" class="notloaded">4</a></li> <li > <a href="image_05.jpg"
object-variable in selector syntax?
I want to select all children of an element. so I want to use: $("#main > *").css("border", "3px double red"); as suggested on: http://docs.jquery.com/Selectors/child#parentchild however, I'm within a loop and have defined the parent object as such: tr_element = $(td_element).parent(); now I want to loop through the td's in the tr. So I tried: $(tr_element+" > td").each(function (i) { } but that does not seem to work. how to use an object in a selector when it is a variable?
[jQuery] How to hide pop is blur
There is a button control a div show or not, I want when you click other things then the div will disappear too exclude div itself and also the show button, how to do that? [html] <html> .... ..... <input type="button" id="show" value="show"> <div id="popup" style="display: none;"> .... .. </div> .... </html> [JavaScript] <script> $('#show').click(function(){ $('#popup').toggle(); }); </script>
how to a parent element?
I want to find the parent element of some element. $("tr input").each(function (i) { //loop input elements within tr's if(this.name == "cid[]"){ //checkbox //get parent td_element = parent.this; //stuck here! } });
jQuery Sequential List
Hi Guys This is probably very simple! I followed a tutorial from http://webdesignerwall.com/demo/jquery-sequential/jquery-sequential-list.html and it works fine when there is one <ol> list on the page. Function: $(document).ready(function(){ $("ol.step li").each(function (i) { i = i+1; $(this).prepend('<span class="stepnumber"> Step '+i+'</span>'); }); }); Html: <ol class="step"> <li>something</li> <li>something</li> <li>something</li> </ol> <ol class="step">
[jQuery] Issue with live events, a form and the back button...
Hi, I have build a quite complex widget which contains "some kind of form". It has a form tag, but I'm loading a lot of stuff in there via Ajax etc. Cannot explain it in detail, and the code is too long to paste in here. Now, in a "live('click', function()" I use for one of the form fields, I'm writing a couple of values into hidden fields of another form. That works fine, as I can see them in the generated code. But if I leave the page and then hit the back button, the values are gone. If I write
[jQuery] listmenu
I have 2 questions. 1) When the list is shown and I click an item is there a way to hide the list or do I have to wait until the user moves their mouse off of it. 2) If I add or remove items from the UL that contains the items will this be reflected in the menu? Thanks Paul Speranza
[jQuery] Post variable array
Hi, I'm using AJAX to submit a form. I'm using the POST method. Example: $.post(action, postThis); Both action and postThis are actions. Action is the URL and postThis is the data to be submitted. Right now, this isn't working. I know I can pass the action variable because that has always been working. But how do I put the parameters there as a variable? It will work if I express the parameters like this: $.post(action, {Name: "Jimmy", Username: "Something", Password: "something", Email: "something@someplace.com"
[jQuery] How to bind text to trigger checkbox?
Couldn't find it in documentation. For example i have <span>text</span> and when someone clicks on it, it should trigger checkbox to "checked" or "unchecked". Thanks! :)
[jQuery] passing a value to popup, reading from db, & form validation
Hello, fellow jQ people! I have three questions about jQuery. 1) I have a web form in a jQuery popup. For that web form to function, I need to pass a value to it. Following code demonstrates how I am processing the form using jQuery: Code: $(document).ready(function(){ $(".addbutton").click(function(){ //add button in HTML centerPopup(); // works fine loadPopup(); //works fine }); $("form#edituser").submit(function() { usrObj.act = $('#modaction').val(); if (usrObj.act == 'add_user') { usrObj.usr
Hello
Hi, I have this script here. Hope i can paste the code. Please click on the login tab on the right side. The issue is, the tab slides down as well as grows. Please help. It should only slide down, not grow. Please help me. <html> <head> <script src="jquery-1.3.2.min.js"></script> <script src="jquery.corner.js?v1.99"></script> <script> /**************rounded corners start**************/ $(document).ready(function(){ $('div.inner').wrap('<div class="outer"></div>'); $('p').wrap("<code></code>");
[jQuery] [treeview] jquery 1.3.2 and treeview 1.4
Hi, I need to use treeview with jquery 1.3.2 and I found it was not working properly. I have since then submitted the bug report with a patch. You can see it at http://plugins.jquery.com/node/9332. Anyone can take a look? It'd be good if it's fixed one way or another. Regards, f.-
Jquery & mootools conflict
Hey everyone i have a page where i need to have both classes working. i used the var $j = jQuery.noConflict(); (its loading after the class files are loaded) renamed all my jquery $ to $j then i have my mootools and im still getting an error saying: Error: $ is not a function but I though noconflict fixed this problem? All my jquery stuff is wroking though.Any clue? thanks
[jQuery] JSON how to transform an object into an array?
Hi all. I got an php page who picks up data out of my data base and puts it in a multidimensinal array. That array is being encoded to Json $event = json_encode($super_array); Then i made an javasript get funtion to get that array to my main page. function get(){ $.get("../position of my file/test.php", function(data){ alert (""+data); }); The var data doesn't give me an array it gives me an object while i programmed it to give me an array (inplace of force_object):
Removing/clearing JQuery cookie upon logout
How can I make certain the "accordion" cookie is completely removed when the user logs out? Here's where the cookie is set: var accordion = $("#accordion"); var index = $.cookie("accordion"); var active; if (index !== null) { active = accordion.find("h3:eq(" + index + ")"); } else { active = 0 } accordion.accordion({ header: "h3", event: "click hoverintent", active: active, change: function(event, ui) { var index = $(this).find("h3").index
Improving my mouseenter/mouseleave script
Hi everyone, I've been fiddling around with Jquery and made the following script. It took me some time, but now it works like a charm! The purpose of it is to show a related text on hovering the inside boxes. The text dissapears whenever your mouse leaves the outside box. Since i'm not a big geeky expert on Jquery, I was wondering how this script could be improved into a better, compact, less coded way. Any ideas? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
jQuery-vsdoc.js file
Where can i download jQuery-vsdoc.js file. I need JQuery intellisence in my visual studio 2008. Thanks in Advance.
[jQuery] IE8 General Issues
Hi folks, I'm new to JQuery and am looking to use it in an ASP.NET MVC app running under IE8, probably forced into full IE8 mode (compatibility-mode wise). How does IE8 play with JQuery? Are there any known issues (especially biggies) with JQuery on IE8 or does it work nicely on it? Cheers MH
[jQuery] Add / Remove Class help
I have 2 class options .bookmarked and .not <div id="b_97fd0f" class="bookmarked not"> </div> Or <div id="b_97fd0f" class="bookmarked"> </div> My js looks like $(".bookmarked,.bookmarked not").click(function() { var url_id = $(this).attr('id').split('_'); var status = $(this).attr('class'); //alert(status); $.ajax({ type: "POST", url: '/bookmarks/bookmark/'+url_id[1], success: function(){ if
[jQuery] How to Get Retuned GeoLocation
Hi! Iam using following JQuery Code: /***************************************************/ <script type="text/javascript"> jQuery(document).ready(function(){ jQuery.post( 'http://api.hostip.info/country.php' ,{ ip: '12.215.42.19' ,position : true } ,function(response){ alert(response.Country); } ,'json');
[jQuery] hide() does not hide span in IE, but does in FF
Hi, With the code below, I am having an issue that only seems to occur in IE. The issue is that the "payer_pane" span should be hidden unless the "NEW" option is selected in the "relationship_person_id" select list. In IE, the payer_pane appears despite what is selected in the "relationship_person_id" select list. In Firefox and Safari, the span hides and appears as expected. Thanks in advance for any help on this. Kind Regards, Matt ********************************** JS **********************************
[jQuery] Returned value from first Ajax call is not shown in the second ajax call
Hi, I am new to JQuery and Ajax I am trying to use the value returned from the Ajax call to the another Ajax call.. like <script type="text/javascript"> $(document).ready(function(){ $.ajax({ type: "POST", url: "http://localhost/FormBuilder/index.php/forms/ saveForm/", async: false, data: "formname="+formname+"&status="+status, success: function(msg){ //alert( "Data Saved: " + msg); getformid=msg; }//success });//ajax $("#fb_contentarea_col1down21 div").each(function() { alert("Form id "+getformid);//alerts
[jQuery] Cycle Plugin Error in IE
Hi, I seem to have the jQuery cycle plugin working in most browsers, but get an error in IE6/7 when using the following code: <script type="text/javascript"> $(function() { $('#slideshow') .cycle({ fx: 'fade', timeout: 0, cleartype: 1, speed: '1500', prev: '#prev', next: '#next, #slideshow', pager: '#numbered', pagerAnchorBuilder: pagerFactory, }); function pagerFactory(idx, slide) { var s = idx > 8 ? ' style="display:none"' : ''; return '<li'+s+'><a href="#">'+(idx+1)+'</a></li>'; }; }); </script>
Info after the ampersand gets truncated.
I have a form that has a text area to send data to a mysql database. the problem is when you type contents into the textarea and the contents happens to have an ampersand, everything after and including the ampersand gets truncated. I'm using ajax to store values from the form into MySQL
[jQuery] Odd issue validating email list against regular expression
I am stuck on this seemingly simple validation loop. I want to iterate through a list of comma separated emails entered in a textarea input and check their validity before submitting the form. For some reason even when I enter all valid emails every other email doesn't pass the validation test! var okEmailArr = badEmailArr = new Array(); var emails = $('#emailList').val(); // Get email list from text are input var email_arr = emails.split(','); // split email list into array var reg =
[jQuery] IE8 Selector Bug?
Anybody know why this doesn't work in IE8 with jQuery version 1.2.6? It works in the latest jQuery version but I can't move to it yet because of some other issues. I'm trying to clear all the textboxes in a table row but only the 1st textbox gets cleared in IE8. $('#Row_1 input[type=text]').each(function() { $(this).val(''); });
[jQuery] sifr on newly added tags
Hi, I use sifr on some h1 elements in a certain div. Can it be automated (like .live use) to sifr newly added h1 elements? (I thought about .live, but that is with an event like click). S.
[jQuery] [treeview] How to refresh the ajax-builed tree?
Hi. I'm using treeview with ajax, but when I need to refresh it, it does not open closed branches. As an example. Open the demopage with firebud enabled: http://jquery.bassistance.de/treeview/demo/async.html ok. Now I want to refresh it, so I'm writing this code into firebug console: $("#black").empty().treeview({ url: "source.php" }) but after that I can't open closed branches, however they're loaded and rendered, but stay invisible (display:none). Am I doing something wrong? I couldn't find any
[jQuery] How to add method to plugin, so it's possible to call it from callbacks?
Hi, I'm using MultiFile plugin and it allows you to specify callback functions for events like i.e. afterFileAppend: $(document).ready(function() { var addDescription = function(fileInput, descriptionId) {do something}; $('.multi_image').MultiFile({ afterFileAppend: function(fileInput) { addDescription(fileInput, 'image_description'); } }); }); How can I add addDescription method to MultiFile plugin, so I can use it in all places where I use this plugin?
Attaching a Plugin to an event
I have a lightbox script, that I want to attach to an event to recall it based on values changed. Could you tell me why this works: $("a[rel^='prettyPhoto']").prettyPhoto(); Opposed to this: $("a[rel^='prettyPhoto']").click(function(){$(this).prettyPhoto();}); Or this: $("a[rel^='prettyPhoto']").click(function(){$("a[rel^='prettyPhoto']").prettyPhoto();});
Animating Background colors does not stop animating!
Hi, what I'm trying to do is, when a user hover overs an element, in this case, a li within a div, I want the background color to animate to a different color besides the background color of the body (in this case, black). It works, but the behavior is erratic. For instance, yes, the color will change when I hover over the element but it when I'm within the div ul li, and hover over for instance the paragraph, the background color of the element will animate 2-3 times. Actually when I move around
[jQuery] Slidedown menu works in FF and IE but not Chrome, Safari & Opera
I created a drop down menu (i think i followed a tutorial but it was so long ago i can't remember) which works 100% perfectly in firefox and internet explorer but not opera, safari and chrome. I really want to get it working in all of them though. Perhaps you might know what the problem will be. The Jquery Code: var $j= jQuery.noConflict(); $j(document).ready(function(){ $j(".message_body").hide(); //toggle message_body $j(".message_head").click(function(){ $j(this).next(".message_body").slideToggle(500)
Please help me... Spent a day on this single problem.
Hi, I am kinda new to Jquery. What I am trying to do is pass a variable as a parameter to a plugin. I will paste the code so you can see what I am doing. $("a[rel^='prettyPhoto']").prettyPhoto({ theme: function(){ var $theme_var = 'light_rounded'; if(('body').hasClass('dark')) { $theme_var = 'light_rounded'; } else { $theme_var = 'dark_rounded'; } return $theme_var } }); the plugin works at the following: $("a[rel^='prettyPhoto']").prettyPhoto(); and can take the following parameters: $("a[rel^='prettyPhoto']").prettyPhoto({theme:
[jQuery] jQuery Cycle Plugin - how to construct pagerAnchorBuilder relative to object being cycled
I have several sections on a page that have the same structure, a div with information to cycle and a div with navigation. Each section has the same classes and mark up, but varies with actual content. What follows isn't exact, but similar markup: <div class="section"> <div class="verticalList"> <ul>...</ul></div> <div class="serviceRight"> <img /> <img /> <img /> </div> </div> <div class="section"> <div class="verticalList"> <ul>...</ul></div> <div class="serviceRight"> <img /> <img /> <img /> </div>
[jQuery] BarCamp Phnom Penh '09 - Technology, Communication and Innovation
Sorry for cross posting. An open conference of all things Technology, Communication and Innovation. It's a user generated conferences — open, participatory workshop-events, whose technology-related content is provided by participants. Venue: Paññasastra University of Cambodia (South Campus), Phnom Penh, Cambodia Date: October 3 - 4, 2009
[jQuery] my jquery form plugin not works
this is the code <fieldset> <legend>Edit Organization Department Category</legend> <script type="text/javascript"> // wait for the DOM to be loaded $(document).ready(function() { // bind 'myForm' and provide a simple callback function $('#orgdepartmentcategory').ajaxForm(function() { //var pidval; //pidval = document.getElementById ('hr_tbl_marriages_hr_tbl_particulars_id').value; alert("Organization Department Category Updated!"); // $('#lists_id').load('lists/id/'+pidval).fadeIn ("slow");
[jQuery] jQuery Scrollable Plugin - Removing specific Carousel Panes
Hi, Can anyone who may have used this plugin at: http://flowplayer.org/tools/scrollable.html know how to go about actaully removing a carousel pane from the carousel group. As an example, if I have 5 carousel windows - how can I programmatically remove the carouosel window 2? Any help would be much appreciated. Thanks. Tony.
[jQuery] Drag and Drop in Tabs
Hi, I am using jQuery Tabs to make an ajax call for each tab when clicked. The ajax that displays is like inettuts. 3 or 4 columns of widgets that can be dragged and dropped. The problem that I am having, when I put the html of the result directly in the main page, it works as designed. When I click on a tab, it displays the page, but all the jquery functions in that ajax page are gone and I cannot sort, drag and drop anything. I suspect that the ajax page is not reading the javascripts in the head,
jQuery tab function acting funky in IE
I recently downloaded a tabs plugin demonstrated on this site...http://stilbuero.de/jquery/tabs/ I tweaked the CSS so it matched my website, and brought in some dynamic content (via. PHP & MySQL). The PHP draws the 4 most recently updated blogs, and the tabbing system is picking which query is shown (news, rant, all)...btw, the 'news' and 'rant' currently just have 2 a piece for testing purposes. Here is the website (tabs only on index for now):http://jdhobbs.co.uk/index.php If you load it up with
[jQuery] Can I select <col> and/or <colgroup>?
I've got a table in which I've set up some column groups. <colgroup class="location"> <col></col> </colgroup> <colgroup class="year"> <col class="this"></col> <col class="that"></col> <col class="that"></col> <col class="that"></col> </colgroup> <colgroup class="year"> <col class="this"></col> <col class="that"></col> <col class="that"></col> <col class="that"></col> </colgroup> ... Ideally, I'd like to be able to toggle the visibility of the <col class="that"> - can I select them as cols in jquery,
Next Page