[jQuery] Help with using the 'not' selector
Hi group, I would appreciate a point in the right direction here, as I seem to be getting lost. I would like to be able to write a function which will trigger when the mouse is clicked, but only do a certain thing based on WHAT is clicked. Which is why I figured the "not" selector would be useful. Here is my function: function closeIt(){ $().not("#FM_OPTIONS").click( function() { $("#FM_OPTIONS").toggle(); }); } Basically what I want to say is, if what I click does NOT have the id '#FM_OPTIONS'
Scope of the DOM with JQuery/JavaScript
Hi, I'm a newbie to JavaScript and JQuery. I'd like to know if, when I load some data (in my case a table of data from my db) into a div using JQuery's .load command, is that table (and it's locally created wrapper div) completely unaware of the parent div into which it loads on the original calling page? My mental picture of what's happening is that my main html page plus the loaded page are now all part of the one Document Object but I'm beginning to think that this is a flawed picture (especially
selectable How to get id selected
Hi. How to get id selected in selectable??????? $(function() { $("#selectable").selectable({ selected: function(event, ui) { alert([b]selectedid[/b]); //?????????? } });
Sliding divs not sliding back up after sliding down
I have the following layout for my page in ASP.NET: <div id="content"> <div id="leftnavcover" class="leftnavcover"></div> <asp:PlaceHolder ID="ph_leftnav" runat="server"> <div class="leftnav" id="leftnav"> <asp:Repeater runat="server" ID="rptr_LeftNav"> <HeaderTemplate> <ul> </HeaderTemplate> <ItemTemplate> <li> <asp:HyperLink
Get the input value of "ANY" element <p> tag
Hi Guys, I am having difficulty getting the value of a specific value contained in a <p> tag. What is happening is that it retrieves the value of the first <p> tag value and not the on the user clicks. What I need is to retieve the value from the <p> tag the user click. Snippet code: $(document).ready(function() { $("p").click(function () { var prop = $("#property_links").val(); $.post("n10-shortlist-connector.html", { web_AGENT_REF: prop}); var htmlStr =
The pngFix pluggin and nested png's
Hi there again, I'm using pngFix plugin to work with some png under the doomed IE6 If I apply the fix to the document: $(document).ready(function() { $(document).pngFix(); }); It fixes the first png in the site, in this case one applied to a wrapper div. Inside this wrapper I have another div (menu) which contains an ul with some png's, for those, the pngFix is doing nothing... Supposely, this fix is applied to all the elements inside the document, but it doesn't...[/code]
[jQuery] Display DIVs as Multiple Columns
How can I display a bunch of DIVs in multiple columns? Like Flex's TileList component. A B C C E F G A B C D E F G A B C D E F G
[jQuery] Is there a jQuery script that can do automatic text sizing based on browser window size?
I want to create a page that scales everything on it as you increase/ decrease the browser window/viewport. I can scale everything on the page except the text. You can see my example here (made for IE only now). You can size the browser window and see how it all scales. http://mediazure.com/message_boards/Logo-message-board-template.htm I have not found a solution to scale text with window size. I think that there is a function that can be called called onResize. I only need it to work in IE. If
Imposible to change div's background image
Hello! I'm trying to change the background of a div with an Interval, for this mission I have set up an array with images: var thepic = 0; var ary = new Array(); ary[0] = new Image(); ary[0].src = "url(images/tyrtr.jpg)"; ary[1] = new Image(); ary[1].src = "url(images/ryyry.jpg)"; function doChange() { thepic = (thepic + 1) %2; $('#content').css({"background-image":""+ary[thepic]+""}); } All the time the FF debugger is telling that the css background image property have not been accepted...
this is my fisrtever jquery code.so error is a must
<html> <head> <title>My First jQuery Script</title> <script src="jquery.js"></script> <script> $(document).ready( function() { alert( $('#hello').text() ); } ); </script> </head> <body> <div id="hello">Hello </div> </body> </html> i have put this sript in folder with the included sript which i downloaded from official jquery site......everytime i load it .....a download window shows up asking me to download the above script that is named j.js.....where the prob
[jQuery] Do something when id of clicked anchor is home
Okay so I'm working on a site, with jquery. Nothing realy big. Now I want my menu to display a paragraph, when the corresponding link is clicked. Here's my jquery that I came up with for that: $("a.menuitem").click(function(event){ $("a.menuitem").removeClass("selected"); $(this).addClass("selected"); if($("a.menuitem").id == "home") { $("p.body").addClass("hidden"); $("p.body#home").removeClass("hidden"); } if($("a.menuitem").id == "about")
[jQuery] preventDefault
hello everybody, the site I'm building has a dropdown menu based on an unordered list with 3 levels. I've got it working nicely using jQuery, but there is one thing I can't get working.. this is the problem: the 'a href' on the first tow levels serves to open up the level below without leaving the page. there is a real link for the non-script users, so I have switched off the first two levels using "event.preventDefault();" however, on the second level some items do not contain any 3rd level links,
[jQuery] Prepending different content to an element
I have a table with multiple <td> elements. Each contains an <a> hreference. I want to add text before each <a> tag, but it is text dependent on the contents of the <a> tag. I can use the prepend() function to add a fixed piece of text as in $("td").prepend(" fixed piece of text") That works fine. But I'm trying to make the text depend dynamically on the contents of the <a> tag. Something like $("td").prepend($("a").text()) I get no text prepended, in any way that I have tried. Does anyone have any
[jQuery] Trying to pass vars from multiple triggers
Hi I have multiple triggers and I am trying to pass variables via a "rel=" tag (which are unique id's) for each trigger I can get most of it working, problem is that since there are multiple triggers with id="newsTrigger" only the first listed trigger works Using PHP/mySQL. An example trigger is: while loop{ echo '<span id="newsTrigger" style="font-size:0.8em;" rel="'. $rowNewsid[$counter].'"><a href="'.$rowNewsPermalink [$counter].'">'.substr($rowNewsHeadline[$counter],0,40).'</a></span>'; } The
How do you toggle checkall?
I'm using jqtransform and here's the function for the checkboxes. What code would I use the select/deselect all? $.fn.jqTransCheckBox = function(){ return this.each(function(){ if($(this).hasClass('jqTransformHidden')) {return;} var $input = $(this); var inputSelf = this; //set the click on the label var oLabel=jqTransformGetLabel($input); oLabel && oLabel.click(function(){aLink.trigger('click');}); var aLink = $('<a href="#" class="jqTransformCheckbox"></a>');
Close UI Dialog from inside another URL; send to other URL
I have a php form that is called using JQuery UI Dialog but the form is in a different URL. In other words, the dialogopen opens an IFrame that contains the form. The form works perfectly (data uploaded to mySQL fine) and, after running the upload script, I want it to close the UI Dialog and redirect to another page (a receipt form). The problem is that the form script resides inside a different URL from where the original jQuery call comes from. So...how can I do the following two things: 1) what
[jQuery] jquery form plugin. IE doesnt work
Hello, Im using ajaxForm to submit my contact form at futurekode.com: $('#contactForm').ajaxForm(function(data) {} -- This works fine in all browsers except IE7/8. IE error says theres a problem with jquery 1.3.2 and highlights this line: return"submit"===T.type Could someone take a look at my contact form in IE and see if there is a fix for this? Thanks Mark
[jQuery] Jquery + ExtJS 3.0
Has anyone had any luck integrating Jquery and ExtJS 3.0? I downloaded the ExtJS 3.0 SDK and I have a page where I am trying to test out there grid functionality. So I included these javascript files: ext-all.js and ext-jquery-adapter.js I have taken a look in the Jquery documentation at the page Tutorials:Using Ext With jQuery For one thing I couldn't find jquery-plugins.js with the ExtJS SDK, but i figured that since im using version 3.0 versus the 1.0.1 that is used in this tutorial that this
[jQuery] killSession() PHP function inside $(window).unload
I'm doing a simple chat script and I have the killSession function which kills the current session and deletes the user from the DB. The problem is that after the name is set and verified the chat form doesn't load, it just kills the session and goes back to the loginForm (). Here's the script: <?php if(!isset($_SESSION['name'])){ loginForm(); // set a name for chat } else { ?> // chat form $(window).unload( function () { <?php killSession(); ?> }); Is there a way to trigger
[jQuery] Access elements in dynamically loaded markup
Hello, i'm beginning jquery right now and have a question. I have a js application, that loads formular-markup dynamically for a specific entity. Is there a way to access elements within this dynamically loaded markup through jquery? eg. in the form load function: $('#container').empty().append($(entityForm.markup).addClass ("formContainer")); somewhere else, another function (eg to set the value of a input element): $('#input_field_a').val(entity.title); Can i make the elements in dynamically loaded
[jQuery] [SimpleModal] Simplemodal is triggering $(document).ready
Hi, I've been using simple modal for quite some time. Now I have a problem. I have some code with uses $(document).ready and simplemodal. The problem is I have 3 $(document).ready calls: 1-when page is loaded 2-when simple modal shows the overlay 3-when simple modal hides the overlay How can I prevent simple modal from triggering the events? Regards, luis
[jQuery] JavaScript Parsing
I want to load a site via $.load() or $.ajax dynamically. This site is a html site with <script></script> tags, This <script>-tags should be parsed is that possible?
[jQuery] localscroll not working, help?
example here: http://unedible.com/alicewhite/ what's wrong with it?
[jQuery] when LocalScroll is called properly, anchors don't work
... That's what's happening. $(document).ready(function () { $('#nav').localScroll(); }); page is here: http://unedible.com/alicewhite/
help creating a horizontally scrolling website.
Hello everyone, I'm fairly new to javascript and the world of jQuery. I'm trying to implement the jquery plugins, localScroll and scrollTo to make a horizontally scrolling website. I've scoured the internet for a cohesive tutorial on those plugins but all of them seem to either assume the reader is fairly competent with javascript already, or just leave some "obvious" coding out of their tutorials. I will explain what I would like to accomplish. I have a menu div at the left of the window that when
Please help with jquery skinned form: the css is not applied
I'm using the jquery plugin [url="http://www.dfc-e.com/metiers/multimedia/opensource/jqtransform/"]found here[/url]. I love the look but I have a form that uses functions like this: function cascadeCountry(value) { if (document.getElementById("srchlookstate_province") != null) { http.open('get', 'cascade_search.php?a=country&v=' + value ); document.getElementById('srchlookstate_province').innerHTML=" "+loadingTag; http.onreadystatechange = handleResponse; http.send(null);
[jQuery] variable scope
Hello everyone, I'm new to jQuery and need some help with a trivial question. I'm trying to program a menu bar and I'm having problems with variable scope. Below is a snippet of my code: // ****************************************************************************************************** <script type="text/javascript"> $(document).ready(function() { var menubar = new MenuBar(); }); </script> <script type="text/javascript"> function MenuBar() { this.currentIndex
[jQuery] How to move tab from left to right?
Hello. Please, can you give me advance how to move tab from left to right? Example: I have 3 tabs, when I click to any tab then it moves that from left to right and it puts as last one. Does exist any solution for this? Jan
[jQuery] Obtaining the value of an element
Hello Using PHP to output some mySQL table data: code: echo ' <span id="approveid">'.$row[id].'</span>. '.$row [topicTitle].' <span id="approveTitle"><img src="../img/icons/ icon_checkex_sm.gif" alt="unapproved"></span>'; ... ... there are 40+ rows, all with a unique $row[id] /code So if the user clicks the span id approveTitle I initiate an ajax request I want to update the row in the mySQL table that the id of the row being clicked on is used as the id key for my table row that is being updated
[jQuery] jQuery handling of URL params?
Hello, Rails has a hash named "params" which contains information from my current URL. Does jQuery have something like params? Related question: What is the jQuery-way of getting data out of the current URL? -Audrey
Refreshing a function/.click event
On page load I have this $('.deletevar').click(function(){ ...some code... }); Now this function uses ajax to reload the html for $('.deletevar') rendering the function I had originally set useless, unless I run $('.deletevar').click(function(){ ...some code... }); after the ajax call. Is there a easier way to do this? As currently if I want to make changes to this function I have to edit it in 2 places. Just need a way of keeping one copy of the function and refreshing it after the ajax call.
[jQuery] accessing the ajax loaded content
so guys..what i'm trying to do is to acces the content loaded via AJAX but in an other way than by a callback function. i have a div where the data will be loaded via ajax, the data is represented by a list of folders and when i click one of them i want to load then the subfolders...and so on, but if i use the callback function this is not gonna be dynamic..cause i don;t know how deep is gonna be the tree. for example: if i have this html <div id="loaded_data"></div> and after the data will be loaded
how to retrieve the value of and element
HI i want to retrieve the value of different elements in the page . Like listbox , testbox and some other . How can do this work? TNX
Drag and Drop from a list to other html elements
Hi there This is my first post and i'm quite new to JQuery. Basically i'm building a website for my local football team and I want to build a dynamic squad selector using JQuery. There will be a list of say 22 players on the left. The user then drags one of these players from the list and into one of 11 divs (or similar?) elements, until they have selected their favourite 11 players from the listed 22. When the user drags from the list into a div then this player is removed from the list (to prevent
[jQuery] Help with show hide function
HI Everyone I have the following jquery script $(document).ready(function() { // hides the all tabs as soon as the DOM is ready // (a little sooner than page load) $('#homeTab').hide(); $('#whoTab').hide(); $('#whatTab').hide(); $('#whereTab').hide(); $('#workTab').hide(); // display the homeTab by default $('#homeTab').show('slow'); // set home menu state to active $('#home>a').addClass('selected'); // toggles the tab on clicking the noted link $('#home').click(function() { $('#homeTab').toggle(400);
LavaLamp / Hover Text Issue
Hi guys I've created a simple LavaLamp menu with JQuery, however the problem is that by default my text color is White, and the LavaLamp hover image is White too, therefore when the Active tab is clicked, the text doesnt show (but the others do since its not active/clicked) Also I noticed that the text colour changes when on Hover, but when it loses focus (the LavaLamp effect still remains on the hovered text) the text turns white. What im trying to achieve is that when the tab is selected, the text
[jQuery] [validate] - how to validate tinymce editor?
Hi, anybody knows how to validate tinymce HTML wysiwyg editor? http://tinymce.moxiecode.com/ The main issue is that editor hides textarea and renders an iframe where you edit stuff...your text is copied to the textarea on submit....but validation plugin is faster and it displays an error message... after you press submit again...(the text is already present in text area - from previous click and then it is validated OK. Is it possible to inject somewhere inside validate() some action before it is
[jQuery] Which event to use with form elements
Hi, is there any event that I can use to trigger an action immediately when a form element is changed? (And similarily when it is changed and then looses the focus.) I think JS does not provide such an event but maybe jQuery provides some kind of "virtual event" for this case? Regards, André
Issue with preventing menu interaction during animation
Hello all. Im really stuck at this and out of ideas. Basically I have li#a, li#b, li#c that changes the main content. One click too many times and it messes up. So i unbinded the li click functions while the animation is taking place. However i am having an issue trying to bind them back. Here is the code: function selectAbout() { $("div#bodyContainer > *:visible") .hide("drop", {direction: "right"}, 1800), $("div#bodyContainerAbout") .delay(1900, function(){ $(this).show("drop", {direction: "left"},
[jQuery] Draggable problem
Hi there, I am developing a web based desktop similar to eyeOS (google it to see more). I use jQuery to power the ajax part. Everything works great so far except that I have a little problem with the different windows (all div's) that I open. I made them draggable which works but they are draggable wherever I click. Now inside those divs I have some content like a titlebar with the name of the application and maximize, minimize and close buttons. I want it only to be draggable if someone clicks on
Next Page