S not defined
I am really stuck. My code is working but I get the "s is not defined error" What is wrong? [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"> <head> <title>Collapsible Panel</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" href="jquery/css/ui.all.css" type="text/css" media="screen"> <link rel="stylesheet" href="jquery/css/jquery-ui-1.7.2.custom.css"
[jQuery] Simple/short way to bind one event to multiple objects?
I have 2 or more objects that onclick(), will call the same function. Right now I have the following: .... $("#obj1").change( function() { setupPage(); }); $("#obj2").change( function() { setupPage(); }); $("#obj3").change( function() { setupPage(); }); .... I was wondering if there is a way to simplify or clean up the code, since they are all doing the same thing and responding to the same event. This is just for refactoring reasons because my code is getting too long/messy. Thanks.
Spacegallery Hyperlinks
Hopefully I'm in the right place and somebody can help. Anybody familiar with this spacegallery? http://www.eyecon.ro/spacegallery/ What I require seems straightforward, for each image in my gallery I would like to have a unique URL, so if there are 5 images then 5 different URL's thus enabling me to toggle content relating to the particular image when it is clicked. The code I believe I need to change is as follows; //constructor init: function(opt) { opt = $.extend({}, EYE.spacegallery.defaults,
[jQuery] content containing JS retrieved via AJAX crashes browser
I am trying to create a a page that pulls in some content via AJAX. Here are the details: The base page has a bulleted list which is clickable. This list is inside a content element which itself is in a parent element (<div id="parent_container"><div id="base_content"><ul id="the_list">...</ul></div></div>) On clicking a list item, the content_container is hidden, and the new content is retrieved via AJAX as html (also tried it as text) and is added to the parent_container. An additional element
Noob looking for help with selectors
Hi, I have a table with a header consisting of colspans. Now I am looking for a way to select all th-elements having an index smaller than a given one for example 4 with a colSpan attribut greater than 1. Is this somehow manageable? I've tried stuff like this but not had any luck so far: var test = $('thead tr:first th:lt(4)['colSpan!=1'], this); Any advice would be appreciated. Thanks.
[jQuery] Jquery gradient and tabs
When I try using jquery gradient plugin with tabs, I see that the tabs get disabled. Does anybody here know the reason behind it ? -- Anush
[jQuery] Problem with .live() events in a widget in FF3
I am creating a simple jQuery widget and have the following two lines in the _init() method. this.element.find("li.thumb img").css("cursor", "pointer"); this.element.find("li.thumb img").live("click", function() { alert (); }); The addition of the style property in the first line works in both IE7 and FF3. However, the binding of the event in the second line only works in IE7, not in FF3. Elements are dynamically added to the widget so I need to use the .live () method. Any thoughts on why this may
[jQuery] Easy show()/hide() Question
I am missing something fundamental and am sure that someone can point me in the right direction. I have a list like so: <li id="GalleryMenu"><a href="../Gallery/Default.htm">DD</a> <ul class="DoNotDisplay"> <li><a href="../Gallery/Santuary.htm">Santuary</a></li> <li><a href="../Gallery/Stream.htm">Stream</a></li> <li><a href="../Gallery/Winter.htm">Winter</a></li> </ul> </li> I have styled it so that the list items float. The class DoNotDisplay hides the unordered list. When the mouse hovers over
[jQuery] Jquery document .ready function throwing object expected
Hi, I'm getting Javascript error "object expected"on PageLoad at the following line: $(document).ready(function() I found that alert(typeof $); is returing undefined. Below is the code snippet: <script src="../../Scripts/jquery-1.3.2-vsdoc.js" type="text/ javascript" language ="javascript"></script> <script src="../../Scripts/jquery-1.3.2.js" type="text/javascript" language ="javascript"></script> <script src="../../Scripts/jquery.validate.min.js" type="text/ javascript" language ="javascript"></script>
Tricky recursive callback question
I've spent the best part of an evening looking for an answer to this on the web (and on this forum) to this problem, and don't seem to be coming up with anything - it might be that this is a very established practice and I just don't know what it's called. My situation is this: I am making a file manager console which is split into two columns - the left column is a list of folders, and the right is a view displaying files within a specified folder. My idea was to have the right hand 'viewer' populate
[jQuery] Closing thickbox in cross domain
Hi All, We have a requirement where we are opening a thickbox when user clicks on the button which is running on particular domain. The i want to close the thickbox when user clicks on the button which is inside it (the page is from another domain). I tried to close it using window.top.tb_remove(); tb_remove(); however i am getting permission denied error. Does anybody know how do i resolve this? Thanks, Baby
Gallery for text
I was surfing the Net a couple of weeks ago and came across a plug-in that acted as an image gallery but inserted text from an html file. I have been unable to find it again. Has anybody come across it and knows where I can find it? Thanks
[jQuery] trim string
Hi, I have an array like this cat=(com12, com1, cop233, com1.1, sap-12-1) I want to take out all the numbers and "." and "-" signs the desire result is cat=(com, com, cop, sap) how can i do that please ?
[jQuery] Superfish Sub menu font size change?
I'd like to have the sub menu a different font size to the main menu but when I change it all appears okay until I have a sub sub menu and then that column then seems to overlap the sub menu column, rather than staying perfectly aligned next to it. Is there any way to change the font size without this happening? Thanks in advance.
[jQuery] How to change the pathClass when a sub-menu is clicked using Superfish
Hi, how do u change the "pathClass" when a sub-menu is clicked.. in the examples given in Superfish.. (http://users.tpg.com.au/j_birch/ plugins/superfish/#sample4) the pathClass is changed from the server-side by adding the 'current' class to the list items.. i want to apply the 'current' class to the list items using the javascript without calling back to the server... any help will be really appreciated.. thanks
[jQuery] Help with getting variable
Hoping for some simple help here. I have this structure in my forms name="data[User][username]" But depending on the form it the ['User'] section will change throught the site. How can I pull the User as a variable? The script has something like this: $.post('/ajax_validate/users/', { field: fieldName, value: fieldValue }, Where I want to add the variable like $.post('/ajax_validate/'+myVarHere, { field: fieldName, value: fieldValue }, Thanks, Dave
[jQuery] Hide/Show based on radio button selected
I am trying to create a script that will display content based on if a radio button is selected, and if the other is selected would hide the content. Now, each of these radio buttons are part of a radio group, so their names are the same. Most examples show input:radio [@name=item] Since I have 2 items that have the same name, I can't use name, so I thought I would try id or value. It isn't working. If I add only the show, whenever you select either radio button, it shows, and if I add the hide code,
[jQuery] jCarousel: restart the carousel
Hi all, I'm using jCarousel as a video playlist. There's a total of 8 items, 6 shown at load. The playlist plays item to item in the carousel until the last one. Once the last item is played, the first item starts playing again. As I need the carousel to scroll to the first item when the playlist is restarted I've done: $("#playlistInner").css({"left" : "0px"}); The DOM: <ul id="playlistInner" class="jcarousel-skin-mytv"> <li><a id="item1" class="playlist_item" ...... And this seems to work, the
[jQuery] Iframe - adding and removing hidden form elements
Hi, I have a page that opens up an iframe for the user to be able to select photos. Each photo has a checkbox, and on select I add a hidden form element to the parent frame form. This all seems to work fine, but im now stuck on how to remove the form element when the checkbox is un-checked. Heres what I have: $(document).ready(function(){ $(':checkbox.addPhoto').click(function(){ if ($(this).attr('checked')) { // Add element to form $("#post",
[Solved] Slider jumping when mouse is released
Hello all, I'm trying to learn jQuery and I'm having a little problem using the slider. I've got a function that's run when the slide event happens but that doesn't seem to be enough to keep the thing that is updated in step with the slider. I'll move the slider, the element it controls will update and, though I've kept the slider still, when I release the mouse button it jumps to different value. To make it more confusing only one of the two sliders on the page seems to show this problem. To see
[jQuery] Intercept javascript event
Here's what I'm trying to do : I have a page with some links. Most links have a function attached to them on the onclick event. Now, I want to set a css class to some links and then whenever one of the links is clicked I want to execute a certain function - after it returns , I want the link to execute the onclick functions that were attached to it. Is there a way to do what I want ? Here's an attempt at an example : $("#link").click(function1); $("#link").click(function2); $("#link").click(function(){
[SOLVED]Manipulation of a navigation
Hello everybody, I am currently creeating a navigation, am am a bit stuck with the navigation. So here's the html I have: <ul> <li class="selected"> <a href="#">about us</a> <div class="submenu"> <ul> <li><a href="#">1.1</a></li> <li><a href="#">1.2</a></li> <li><a href="#">1.3</a></li> <li><a href="#">1.4</a></li> <li><a href="#">1.5</a></li> <li><a href="#">1.6</a></li> </ul> </div> </li> </ul> And here is
Jquery dynamic Drag and Drop
Hi All, I am using jquery for drag and drop functionality. The elements of drag and drop are dynamic means number of records i want to drag and drop is dynamic. I have create dynamic drag and drop event also for each element (record) by using for loop. When i drag one record and drop it to another, but i don't get id where i drop the draged record.
Simple Hello world! not working in Firefox
Hi there New to Jquery but I have a problem with compatability between IE and Firefox. $(document).ready(function() { $("a").click(function() { alert("Hello a"); }); }); This works fine in IE 8 / 7 but when I try it in firefox it does not do anything. Am I missing something stupid like a semi colon?
[jQuery] Superfish and multilingual support
Hi, Does Superfish support multilingual joomla 1.5 extensions like Joomfish or M17n? What I need is that based on the language selected on the site display the menu items on that specific language, and when the language is switched that displays the menu items in that different language.
[jQuery] Changing the slider value programatically
How do I reset a slider value after it has been declared from a calling page? I have a modal box, that has a form in it. I use this form to add/ edit items. Within that form, I have a slider from jquery UI. When I click on a link to bring up the modal box and EDIT data, I'm having trouble populating the slider with the appropriate value. Anyone know how? THANKS IN ADVANCE! Here is the relevant code from my files: MAIN PAGE: <script type="text/javascript"> <!-- $(document).ready(function()
[jQuery] this.each is not a function
Hello, I am using JQuery 1.3.2 and I get the error "this.each is not a function" when I try to use the following plugin: jQuery.fn.defuscate = function(settings) { settings = jQuery.extend({ link: true }, settings); var regex = /\b([A-Z0-9._%-]+)\([^)]+\)((?:[A-Z0-9-]+\.)+[A-Z] {2,6})\b/gi; return this.each(function() { if ($(this).is('a[@href]')) { // If it's an <a> element, defuscate the href attribute $(this).attr('href', $(this).attr('href').replace(regex, '$1@$2')); // Make sure that the element's
[jQuery] something amiss with json call/file
Hello, I have the following code: // pull in json feed and inject panes into page $.getJSON("http://www.pomona.edu/dev/home/spotlight.json", function(data){ $.each(data.items, function(i,item){ $('<div class=\"pane\"></div>').appendTo('#spotlight-panes'); }); }); and I cannot figure out what is going wrong. As you can see, I am not even trying to do anything yet with the json data, but assuming that I should still be seeing some divs injected into the DOM.
Progress bar AFTER file uploaded
Hi, I've read about the available options for adding progress bars for uploading files, but what I'm doing is processing the uploaded files as soon as they are uploaded. This processing typically takes longer than the upload. Is there any way I can get progress bars for this part of the processing (i.e. after the file has been uploaded)? Would appreciate any help with this. Thanks
Remove Duplicates From Two Select Boxes
I have two selects. The first being the select to remove the options from, and the second being the source to find duplicates from. How do I use jQuery to remove the the options from the first, if, and only if the option value is in the first and the second select? Would like a function, something like: removeDuplicates($("#select_1"), $("#select_2"); Thanks very much. EX: BEFORE DUPLICATES REMOVED: [1st Select] <option value="1">1</option> <option value="2">2</option> <option value="3">3</option>
fadeIn does not work.
Hello, i need some help at the "fadeIn" method for a simple div as seen here: http://dawntec.com/jquery/ The box does not fadeIn at all. Where is the error? slideDown("slow") does not work as well slideUp("slow") works! The CSS: .box { width: 702px; height: 405px; border:10px solid black; background-color:blue; } The JS: <script type="text/javascript"> $(document).ready(function(){ $(".box").fadeIn("slow"); $("p").fadeTo("slow",0.1); }); </script> The html: <div class="box"><p>Some
[jQuery] Ajax not working in Firefox
Hello Everyone, I'm fairly new to using ajax with jQuery and I'm having an issue in firefox. Here's my ajax call: $.ajax({ type: "POST", url: "newcoleng", data: "F10=Yes&F11=No", success: function(data){ alert( "Data Saved: " + data ); } }); The post always comes back a success in both IE and Firefox. The html response comes back as expected when using IE. However, the html response when using Firefox brings back an error from the server instead
[jQuery] Grid as Subgrid: '+' symbols not showing up
Hello... I have a nice little grid going, and I'd like to add in a 'grid as subgrid' to view details of each record. I have a function which looks something like this (see below) - now the column where the plus symbol should show up is there, but with nothing in it - and clicking on the empty column does nothing. Inspecting the element with Firebug shows '<td style="" role="grid"/>' So...any idea what I'm doing wrong here? Using version 3.5.2, with a custom style. function show_grid(fid,start,end){
[jQuery] Odd problems with jQuery and XHTML in Firefox.
I have a full explanation of my issue on StackOverflow.com - if you're interested in the code, please refer here: http://stackoverflow.com/questions/1190763/firefox-not-running-jquery-for-xhtml-output It is marked as answered, but ignore that. The gist of the problem is when I load a *local* .xml file (in firefox) the document transforms to XHTML, but the jQuery .append (' Ipsum Lorem') (as well as prepend, prependTo, appendTo, remove, etc) method silently fails to do anything. HOWEVER, if I construct
[jQuery] ajaxForm error call back
How do I access my form object inside of the error callback? $('#foo').ajaxForm({ error: function(){ // where's my $('#foo') object here? } });
autocomplete, MSIE 7, document.body.style.maxHeight
In the Autocomplete plugin, this is code like this: show: ... if (options.scroll) { ... if($.browser.msie && typeof document.body.style.maxHeight === "undefined") { ... I'm using IE7, and in some cases my suggestion list is not being limited by the scrollHeight option. I've put an alert statement before the second if statement, and typeof document.body.style.maxHeight is "string" and it has length 0. If I change the second if statement to: if ($.browser.msie && document.body.style.maxHeight
[jQuery] jCarousel and links
HI I am trying to work with the jCarousel plugin by Ian Sorgalla http://sorgalla.com/jcarousel/ Does anyone know how I could wrap a link around each of the images in the Carousel ?
[jQuery] [validate]
I am using jQuery validate plug in. I have configured validate plug in for two text fields. Error message are displayed right below the text box in case of empty or invalid input in FF and IE7. Only IE6, displays the error message next to the text box and it wraps it from there. Any ideas how to fix this problem in IE6.
A nice jQuery content slide, any ideas?
I've seen this really nice slider on www.formfiftyfive.com (when you click the links at the top i.e about, it will drop down revealing content) It moves the entire site rather than just overlay. I really like this and would love to implement it into my site? Any ideas what it is and how I can use it?
Basic jQuery SHOW (if/else) almost working, syntax help
OVERVIEW Prototyping a page for client, who wants validation on a specific select option. Wants this validation to occur on submit of page. I am using jQuery SHOW function if select option specific index = true, If index = false, then go to some other page. The SHOW function works on the IF portion (desired option value = true) But then immediately fires the ELSE portion (go to some other page) HEAD <script language="javascript" type="text/javascript"> $(document).ready(function() { //validate
Next Page