[jQuery] Help with jQuery Suckerfish 2-tier navigation
Hello all, Any help on this is greatly appreciated people :) I am currently working on a site for a local college - I have implemented a jquery suckerfish menu as 2 sets of lists, I am looking to to make the first (top level) nav remain in its hover state when/while the second (sub nav) is shown :S Other than that its working perfectly first time posting scripts so here goes.... menu.js // function mainmenu(){ $(" #nav ul ").css({display: "visible"}); // Opera Fix $(" #nav li").hover(function(){
[jQuery] How to solve this
I have a form <form method="post" action="MyURL" enctype="multipart/form-data"> <input type="hidden" name="token" value="12"/> <input type="submit" value="Go"> </form> The form uploads a large file so that I would like to inform a user to wait, after he pushes the submit button. So I have ... ... $('input[@type=submit]').click(function() { $('#InformUserText').show(); return false; }); .... .... The text ( see InformUserText) is shown but the action script from the form, see
[jQuery] Firefox flickering with tab-slider-script
Hi, I'm experiencing heavy flickering with a "coda-slider" script - only in Firefox/WIN. It's available here: http://eucnordvest.dk/Oversigt+kategorier.3631.aspx (please, do not mind the Danish language). It's build up with a scrollerbox with a set width. Inside there's a container with the three panes, each with the same width of the box. Each pane is floated left. Everytime you switch tab in Firefox it flickers heavily. Any workaround to this would be greatly appreciated :-) Thanks, Oskar
[jQuery] calculating size (a problem is if statement)
i'm having problems with this code: if ($('.carousel ol').children('li.panel').length > 0) { $('.carousel ').append('<ul class="nav-carousel"></ul>'); // build links $('.carousel ol').each(function(i){ var carouselNavDivs = $('ul.nav-carousel'); $(carouselNavDivs[i]).append('<li> # previous </li>'); $(this).children().each(function(j){ linkNum
[jQuery] Add callback to plugin?
What is the best way to add a callback to a plugin that I wrote? Do I just add it as an additional option? So, after the ajax function is run, how would I allow a custom callback or function to be added by the user? $.fn.testStatus = function(options) { var defaults = { status: '?action=live' }; var options = $.extend(defaults, options); return this.each(function() { var obj = $(this); var itemId = obj.attr('id'); var itemHref = obj.attr('href'); obj.click(function() { var question = confirm('Are
Please HELP !! jquery.history
hi everyone i'm using jquery.history to manage history with ajax page i'm using this script <script type="text/javascript" src="http://localhost/js/jquery-1.2.6.pack.js"></script> <script type="text/javascript" src="http://localhost/js/jquery.history.js"></script> <script type="text/javascript"> function pageload(hash) { if(hash) { scrollTo(0,0); ActivateRendering('LargeListControl',hash); } else { $.historyLoad(1); } } $(document).ready(function(){ $.historyInit(pageload); $("a[@rel='history']").click(function(){
[jQuery] multiple toggle classes within one ID
Hi, I'm trying to implement multiple toggle classes within one ID. When you toggle 1 class, the intial span 'view details' would hide and the hidden span 'hide details' would display. the problem i'm having is i'm unable to specify the text toggling to happen just to the current class. its happening across all classes. See code example below... ----------------------------------------------------------------------------------------------------- <script type="text/javascript"> <!-- $(document).ready(function()
[jQuery] toggleClass and CSS inheritance
.toggler {background:#fff;} .open {background:#000;} $('.toggler').click(function(){ $(this).toggleClass('open'); } It's really a CSS problem, because the DOM does toggle the classname. But the background does not change. <div class="toggler open">blah</div> Only solution I can think of is not using toggleClass, but its so nice and simple that way. Anyone know a solution by chance? Thanks a lot!
[jQuery] Accessing elements produced with AJAX
Hi all! I have a question regarding the ability to access content produced by an AJAX request. I have a simple tabular row: <tr id='1'><td id='first_name'>Ben</td><td id='last_name'>Ross</ td><td><input type='button' class='edit' value='Edit'</td></tr> I use jquery to obtain the id's of each td when the "Edit" button is pressed, send them off to a php script. The php script queries the database, returns the values of the row relating to the id given by the row id, and replaces the row with the following
[jQuery] using my{} instead of ${}.
Hi Can I use any other character in my jquery functions. Thats may be using my{} instead of ${}. Thanks Amit Sharma
[jQuery] Filtering DIV from Form
I am trying to use checkboxes to filter a group of DIV elements based on their class. The example below works but I am looking for a better solution.The code below uses the form plugin. This works.... <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http:// www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/
[jQuery] [jQuery UI: Sortables
Good evening, I am rather new to Jquery and js in general and I'm trying to implement a few things into an existing application. Believe me when I say learning jQuery has been far easier that messing with anything else out there... Now, in regards to my current issue. I have a list of menu items that I am attempting to make sortable ... I have the UI Sorting working, but I'm not sure how to set up an attached form to do an ajax submit to "save" the list order back into the database ... Can anyone
[jQuery] empty().append() slow
if I have a lot of elements inside <div class"full">...</div> and then do $('.full').empty().append ('blah'); it takes a long time. Is there a way to speed that up?
[jQuery] Crossbrowser problem with Jquery Extension fieldSelection
Hi, I'm using the Jquery extension fieldSelection ( See at: http://laboratorium.0xab.cd/jquery/fieldselection/0.2.3-test/test.html ) This extension resolves the selectRange problem of the tradicional javascript, but, I found another problem now, the start and end positions returned are different in IE and FF. Look at this: In the fieldselection extension's site, we've a example box, when I select the word "test" of the second textarea, in the Internet Explorer it shows: start: 31 , end: 35 and in
[jQuery] Thickbox positioning
I am trying figure out how thickbox positions an image that is centered horizontally and verticly. The CSS shows that it is position:fixed; top: 50%; left: 50% when trying this, it makes the element off center, to the bottom right of the browser. Does thickbox use extra jQuery to position its "thickbox" within the center of the browser window, even when resizing it still keeps in the center. Does anyone know how this is possible? I must be missing something small here... Thanks!
[jQuery] Show Function Disappering
So Im just starting to learn JQuery and im making a simple webpage that hides a paragraph when the page opens and then you click a link to view that paragraph. However when i run the script, the paragraph comes on for a second and then disappears. I searched for a fix and i havent found anything yet, so i came here. Im using the newest version of Jquery (1.2.6) Any help would be appreciated. Thanks
[jQuery] Array in get help
I have an checkboxes in form and I have unique ID for each of them... and something like this : var x = new Array ( 'idx1','idx2' ); and I need to do something like this: for ( var i in x ) { $('#x[i]').attr('checked', true); --> this isn't working } ....I do not have any idea how to change an array like some element....
[jQuery] <select> width shrinked after appending new <option>
Hi, The problem is simple. I just want to add <option> to <select>, but the size of <select> shrinks. This happens in IE7. Works fine in FF3. I couldn't find any post about this problem. Maybe I was doing something wrong. Can anyone help? Thanks! Below is the simple html I used to test. --------------------test source----------------------- <html> <head> <style type="text/css"> select { width:100%; } </style> <script type="text/javascript" src="../script/jquery-1.2.6.min.js"></ script> <script type="text/javascript">
[jQuery] How to get complete event object model for a page?
Sorry if the subject doesn't quite describe what I'm after. Hopefully the description works better. Ok, so is there a way to find out all of the events and functions that have been bound to elements in a page? For example, if you did <body onload="func()">, or if you did document.body.addEventListener('load',func(),false). The first being inline and the second binding the function "func()" to the load event. I have this code that searches for all inline-defined events, but its only doing attribute
[jQuery] Possible bug in animate() --- and/or --- help me with a workaround?
Hi everyone. First of all, I'm absolutely loving jQuery. Amazing work to all those who have worked on it. Thanks. So, I'm doing a pretty simple animation using the animate method. jQuery 1.2.6. (Complete example source is included at the bottom of this post.) I have an absolutely positioned DIV whose height can be toggled between 50px and 300px by clicking a button. The DIV is the full width of the document (right: 0px), and everything works perfectly in Firefox 3.0.3. The animate calls looks like
[jQuery] Fast trim implementation
Hi As a follow up to Steven Levithan's post about string trimming[1]. I made a second version of trim that is performing quite well among different browsers (the 1st one I posted on his blog). If you're interested, I wrote an article[2] about this. If the implementation proves to be well rounded and effective, it could make it into the core, eventually. There's already a ticket[3] requesting a faster jQuery.trim() function. Comments (and testing) are much appreciated. Cheers [1]http://blog.stevenlevithan.com/archives/faster-trim-javascript
[jQuery] visulization of network in jQuery .... e.g. Gene 1 -->(interacts with) Gene2 and so on..something like social network style,
Hi all, I am bioinformatician and using jquery, its great and fantastic. I am looking for a plugin or script which can display Gene Interaction Data. I have finished one project and try to add one more functionality to it. I like to view Network of info. e.g. Gene1 --
[jQuery] How to select a group of similar named objects?
Hello, I'm trying to select all element on page that have a similar ID... Object IDs are: tag_cWeb_TSW_Day01 tag_cWeb_TSW_Day02 tag_cWeb_TSW_Day03 tag_cWeb_TSW_Day04 Is there a wildcard character I can use to reference all of the above but using the keyword: tag_cWeb_TSW_Day* $('#tag_cWeb_TSW_Day*').css('visibility', 'hidden') ... so I can then set 02 to be visible... $('#tag_cWeb_TSW_Day02').css('visibility', 'visible') ... or something? Thanks, Nick
[jQuery] How to create content from Ajax XML reply?
Hello all, I'm still quite new in jQuery/JavaScript, but I'm managing some old school perl cgi web application, which I already improved with few jQuery plugins and enhancements (datepicker, wymeditor,timeentry). I have a working self made Ajax part for update of inputs (specially selects) from xml server response. so when i get <result> <car_id>5</car> </result> It looks for input with id="car" and update value or when I get <car_sel selected="selected" value="5">nice one</car_sel> <car_sel value="6">nice
[jQuery] jQuery, ASP.Net and Drop-Down-Lists
Hi, I am trying to use a DropDownLists and jQuery, I was trying to use the jQuery events and then call a function but it seems not to be working. No matter what event I choose nothing happens! Anyone got an idea of what could be causing it? Do drop down lists in .Net not have the standard events
[jQuery] [datepicker] 26 october occuring two times: datepicker bug?
Hello, I've weird thing with datepicker, my dates are offset by one day (13 november 2008 is friday), when checking where the inconsistency come, I've find that 26 october is occuring twice. Here is how I instanciate datepicker : $('myselector').datepicker({dateFormat:'dd/mm/yy'}); Does the fact that the UTC offset changed (daylight saving time) at this very date is a reason for such bug? any idea how can I workaround it? Thanks
[jQuery] Executing Scripts returned by AJAX Request
Hi, I would like my AJAX Request to function like this: if empty, all good, proceed. if scripts, not good, execute the script. if no scripts, but something in response, alert the text (some kind of error). Reason I want this is when the user tries to execute an action that requires them to be logged in and they are not or their session has timed out, I would like to output <script> to the AJAX Request page so the jQuery function can execute it and redirect the user to the login form. Is there something
[jQuery] Form Plugin: editing/adding data before send
I am using the jQuery Form Plugin to submit a form via AJAX. One thing I'd like to do, is editing the value of a (hidden) input field, right before the form is sent (or alternatively adding additional POST data in some way before send). I defined a hidden input field (without a value) in the form and I tried to change the "value" attribute with jQuery in the "beforeSend" section of the ajaxForm Options. Unfortunately this doesn't work, the field still stays empty. This is the most basic code of what
[jQuery] Form Plugin Incompatible with Firefox 3
I'm trying to use the jQuery Form Plugin (http://www.malsup.com/jquery/ form/). The "ajaxSubmit" code sample works fine for me in IE7, but it doesn't work at all in Firefox3. The form submits normally, without any JS errors. Has anyone else run into this, and if so is there any way to fix it? I noticed the "ajaxSubmit" code sample doesn't use "ajaxForm" to first initialize the form. What then's the purpose of ajaxForm? The ajaxForm code sample also doesn't work in FF3, although Firebug does show
[jQuery] Event Firing Twice
I am attaching an event to a link. The link lets the user toggle the display of a child div inside of a parent div. However, when the link is clicked, the event is run twice (div opens and then closes immediately). I have tried using .click() and .bind() and it makes no difference which one I use. I have also tried using an anonymous function versus a callback function and there is no difference. I tried using return false and e.stopPropagation() and there is no difference. I have triple-checked
[jQuery] Superfish Feature Request
It would be nice if submenus that WOULD HAVE displayed outside the browser viewable area, to be repositioned so that they appear back inside the browser's viewable area. Thank You!
[jQuery] Can't figure out why click function won't work for lifeimage
I've spent a good bit of time trying to figure this out, so I figure now it's time to go to the forum. I've trying to make "lifeimage" clickable so I can do other stuff with it, but I can't even seem to get the click event to function. Code is below. Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http:// www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
[jQuery] placeholder - treeview
Hello, I'm using treeview to browse a bunch of categorized items. I'm using the async tree. However I want one of the first level items to start "expanded". My solution was to alter the source to display that level using the children node. However, when I set that "expanded": true, there is this "placeholder" node that appears above all of my nodes. I need one of two solutions: A method that will tell the async tree to expand a given node after the initial load, which will cause jquery to remove
[jQuery] Can't figure out why click function won't work for lifeimage
I've spent a good bit of time trying to figure this out, so I figure now it's time to go to the forum. I've trying to make "lifeimage" clickable so I can do other stuff with it, but I can't even seem to get the click event to function. Code is below. Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http:// www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
[jQuery] Select nested <ul> inside a <li> element
Hi. I want to collapse my navigation. But I can't select the nested <ul> inside a <li> The markup: <ul id="navigation"> <li>Fruits <ul> <li>Apples</li> <li>Bananas</li> <li>Strawberries</li> </ul> </li> <li>Vegetables <ul> <li>Tomatoes</li> <li>Peas</li> </ul> </li> This is what I tried to do: $('#navigation li').click(function() { $(this).next().slideToggle("fast"); }); But this code doesn't collapse the nested ul but the next li. When I click Fruits it'll toggle Vegetables.
[jQuery] Form Plugin Incompatible with Firefox 3
I'm trying to use the jQuery Form Plugin (http://www.malsup.com/jquery/ form/). The "ajaxSubmit" code sample works fine for me in IE7, but it doesn't work at all in Firefox3. The form submits normally, without any JS errors. Has anyone else run into this, and if so is there any way to fix it? I noticed the "ajaxSubmit" code sample doesn't use "ajaxForm" to first initialize the form. What then's the purpose of ajaxForm? The ajaxForm code sample also doesn't work in FF3, although Firebug does show
[jQuery] turn-off mails
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"> <head> <meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"> <meta name=Generator content="Microsoft Word 12 (filtered medium)"> <style> <!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;} @font-face
[jQuery] [validate] Help with required code
I have a form field that by default has the value "First". When the user clicks into the field it clears that value, and if they type nothing, when they blur the field it replaces "First". You've all seen this. I want the validate plugin to say this field is required if the value onsubmit is "First". Can't seem to make it work. [code] // validate signup form on keyup and submit $("#contactform").validate({ rules: { name_first: { required: function(element)
[jQuery] jquery cycle plugin problem?
Hello, I have a site here http://www.crsdepo.com/newsite/index_cycle.html where I am using the Jquery cycle plugin but I am having some problems in Explorer 7 and 6. In the right column near the bottom there is a testimonials section, which I have it cycling up, it looks perfect in Firefox but in Explorer 7 there seems to be a graphic glitch on the initial slide/ frame, the top header looks like it is overwriting part of the box, same with bottom. It's fine after the first frame. In Explorer 6, there
[jQuery] If I simulate a click images are not updated
I'm quite new to jquery but this thing looks quite odd. In my default.aspx I have two div tags with background images. I attached a onclick to them. <div id="btnsale" onclick="Javascript:ClickSale();"> <div id="btnrent" onclick="Javascript:ClickRent();"> and in css: #btnsale { background-image:url(../images/btn_sale_o.png); } #btnrent { background-image:url(../images/btn_rent.png); } then I have an input tag: <input type="button" id="hbtnsr" style="display:none" runat="server" onserverclick="SRChanged"/>
Next Page