[jQuery] Find if divs have any content
I am trying to loop through a div, and find any child divs that have no content, if they don't an alert is thrown, if there is content, and alert is thrown as well, but says that the content is full. It does not seem to be looping through all of the elements within my target div, I think I have something wrong with the each() function. Any ideas? $("#test").each(function() { if ($("div").html() == "") { alert("empty") } else { alert("full") } }); <div id="test"> <div id="text">Some text</div> <div
[jQuery] Load JS onDemand, works for the first itration - does not work for the subsequent iterations..
<div dir="ltr"><span class="postbody">I am using the plugin onDemand load js. When you click on "Get Started", it loads the required js files using requireJs() function and I am using load() function to load the required html. There are three simple and quick steps... Once we finish the 3 steps and to start over if we click on "Get Started" without refreshing the page... <b>it does not work as before.. the Next button does not respond. </b> Here is the link: <a href="http://incredible-dimensions.org/flashpaper/"
[jQuery] itooltip "$(window).scrollLeft is not a function"
Hey there, Have a bunch of thumbnails on a page. They work as expected however FireFox error console gives error $(window).scrollLeft is not a function in the tooltip .js file. As I move the mouse around over a thumbnail is continually returns the error...but onely when moving. Any ideas? Thanks in advance.
Load JS onDemand, works for the first itration - stops after
I am using the plugin onDemand load js. When you click on "Get Started", it loads the required js files using requireJs() function and the also the required html using load() function. There are three simple and quick steps... Once we finish the 3 steps and to start over if we click on "Get Started" again without refreshing the page... it does not work as before.. the Next button does not respond. Here is the link: http://incredible-dimensions.org/flashpaper/ Check the source code for the JS. Thank
[jQuery] skins for jquery.rating?
Does anyone know of some alternate skins (or just image files) for the jquery.rating plugin? I'm looking for something with smaller images, at minimum. Alternate colors would be nice to choose from, too. FYI. plugin home: http://www.fyneworks.com/jquery/star-rating/#tab-Overview Thanks, Jack
Onmouseover/out fade background color
Hi, I am using jeditable for an edit in place text box. I am trying to get it to work like demo #1 here: http://github.com/madrobby/scriptaculou ... laceeditor Where when you mouseover it instantly changes color, and when you mouseout it fades out. I downloaded the color animate plugin, and only have one problem: If you mouseout it starts to fade, but if you mouseover again before the fade is done it will not change the color. Any tips? Here is my code: $("#description").editable("/requires/update_data.php?t=pages&n=<?
Class not being applied and other issues
To start, I would have searched had I known where to start but since I don't here I am. Simply, I am having issues with part of my JQ code not running. I am working from examples and marking up my HTML and CSS properly (as far as I can tell). Take a look at http://zasper.com/funky/index.html and notice the menu section works (using JQuery) yet all the h3 tags are still showing and the requested addition of a class to the first H3 is not being applied. When added manually the header sits in the correct
[jQuery] can anyone make these rollovers faster??
please see: http://www.gogreenside.com/ move mouse over 6 tiles. works great on Mac (Safari, Firefox) and Window Firefox. Tiles change slowly on Win IE. anyone know why? thanks Jason
PNG Overlay
I'm trying to have jQuery create a div element dynamically and then apply the CSS styles in my style sheet. However, it's not working. If I view the generated source, I see the div element, but my CSS is not applied. Example 1 is a working version, without jQuery dynamically creating the div element. Example 2 is the code I'm using to add the div. THX Example 1 CSS: .overlay { background: transparent url('overlay.png') no-repeat 0 0; overflow: hidden; position: relative; left: -8em;
dynamically changing text according to the alt attribute?
hi i have a gallery. When someone clicks on a thumbnail the main images changes. However, i also want the text to change. The gallery uses the href attribute to change the image. At the moment i am using the alt attribute of the thumb to replace the visible text on the page. So.. you click on the thumb and the text on the main page is replaced with the alternative text. i.e html <a href="images/photos/mirrors/pinch/11_squr.jpg" title="Image 1"> <img src="images/photos/mirrors/thumbs/pinch/8.jpg"
I can't get my sample rounded corners code to work
Can someone please tell me what I am missing in my code? It's susposed to display rounded rectangle but only displays the text. Thanks... <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> <script type="text/javascript" src="jquery-1.2.6.js"></script> <script type="text/javascript" src="jquery.corner.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("div.box").corner(); }); </script> </HEAD> <BODY> <div id="box1"
table with horizontal and vertical scrolling
Hi, I'm searching for help to make a table with vertical and horizontal header, that permit vertical and horizontal scrolling, using jquery like this http://www.webreference.com/programming ... r/column4/ Someone have a solution?
Multiple hover functions
I have 4 div and I want only one div to show at a time, that div being the one that the last div has just hovered over. The only problem is only one of the div boxes is reacting: $(document).ready(function(){ $("#items1").hide(); $("#items2").hide(); $("#items3").hide(); $("#items4").show(); $("#headText1").hover( function () { $("#items1").show(); $("#items2").hide(); $("#items3").hide(); $("#items4").hide(); } ); $(document).ready(function(){
[jQuery] Superfish feature request - disabled items and menus
I'd like to see an option or method where I can disable a menu, sub menu, and menu items. $("ul.sf-menu").superfishDisabled(); Also, I added these lines to the return this.each function to give me more control over li hovers in IE var $li = $('li', this); $li.each(function(){ $(this).hover(function(){$ (this).addClass(o.hoverClass)},function(){$ (this).removeClass(o.hoverClass)}) });
[jQuery] Is there any way to use multi-line input with .append()?
I'd like to add a number of unordered lists to a document via .append, but it appears all my HTML needs to be on the line I call .append from in my .js file. Is there any way around this? I'm trying to format said HTML for easy editing, and cramming it all on one line doesn't help me towards this goal. Any pointers would be appreciated. Thanks!
[jQuery] Problem creating form elements dynamically in IE7
Hello, I'm using jquery to build a form dynamically using javascript. The code works fine in FF, but in IE, nothing inside or including <form> tags shows up. If I take the <form> node out and append form inputs directly to a <div>, the elements show up in IE, but as soon as I put the <form> tags back, the form elements are gone. I've viewed the generated source in IE, and sure enough, the div that should be containing the form is empty. Here is the code I'm using: var formHolder = $('<div id="formHolder"
[jQuery] [media plugin] https protocol question
Hi, I'm trying to use the media plugin(http://malsup.com/jquery/media/) to be able to play mp3's in a form that allows users to edit metadata about the mp3s. The specs say i have to use Real Player, so I set up the initialization as follows: $.fn.media.mapFormat('mp3','realplayer'); //spec -> REAL Player $('a.media').media( { width: 300, height: 80 } ); This creates the inline object which code looks like: <embed width="300" height="80" autostart="0" wmode="transparent" bgcolor="#ffffff" pluginspage="http://www.real.com/player/"
[jQuery] jCarousel : works great in FF but broken in IE HELP PLEASE
I have a page that is doing a combo of things mutiple scrollers on the page each in a UI.tab each being dynamically generated. and I need to use external controls with this The Page works flawlessly in FF but in IE it will not scroll.... Any help greatly appreciated _________________________________________________________ link to page: http://www.layerdynamics.com/gotgamefinal/tabpanel2.html ____________________________________________________________ code of page: // end jQuery //custom var car1;
[jQuery] All AJAX stopped working (JSON and .load())
Hello jQuery gurus! I'm doing a little site called mytripfootprint.com which is still in pretty early development (not publicly released really) I have two simple AJAX calls that both worked up until about last night. the user clicks on a url. it loads a page with an ID and brings back this page the url is http://www.mytripfootprint.com/tip/show/[ - id - ] like for instance http://www.mytripfootprint.com/tip/show/7 which works fine. the jQuery code looks like this: $(".items p").click(function()
[jQuery] How can I simplify these code
Hi, my script is working exactly. I want to know, how I can simplify these Javascriptcode. Demo: http://hans-drewes.de/selectbox.html Code selectbox.php <pre> require_once('sql.inc.php'); require("Classes/db.class.php"); $db = new db_query; if(isset($_POST['id'])) { if(strlen($_POST['id']) >0) { if($_POST['db'] == "Uebersicht") $db->execute("SELECT * FROM Uebersicht WHERE Kategorie_id = '".$_POST['id']."' ORDER BY Uebersicht ASC"); if($_POST['db'] == "Objekt") $db->execute("SELECT
[jQuery] IE Bug - Now displaying h1 website title in the header
Hello, this is actually not related to jQuery but to general web development. At our site http://www.smartphone-freeware.org/ in the header name of the site and slogan written in white on the green background isn't showing up in IE6 and IE7. All other browsers like Opera, FF2+, Safari are displaying ok, only problem with IE. Any tip or advice how to fix that will be greatly appreciated. Thanks!
[jQuery] Using hover to swap before and after images
I am using: <script type="text/javascript"> $(function() { $("#myImage").hover(function() { $(this).attr("src", "images/retouch1.jpg") }); }); </script> with: <body> ... <img id="myImage" src="images/original.jpg"> ... </body> The image is replaced permanently when the mouse hovers over the image. What do I need to add to the script to revert back to the original image when the mouse is no longer hovering over the image? Jim
[jQuery] jQuery.Rating showing two cancel buttons
I am attempting to utilize the Star Rating plugin located at http://www.fyneworks.com/jquery/star-rating/ but when I initialize the ratings I get two cancel buttons. I'm not sure what could be going on here. Anyone have any ideas? You can see the code at the link below: http://www.roundus.com/zaroundus/ratings/ View the source to see the applicable code. Thanks for any help you can give!
[jQuery] Positioning
Hello, I have an input on my page. I need to determine the position of the input and its width. Then I need to apply that position and width to a div which is position relative and finally show the div. How can I do this? Thanks, Miguel
[jQuery] $().load callback firing early?
I've read in other posts on here that the callback isn't fired until both the ajax request is complete and the new HTML has been inserted into the DOM. I find that this isn't the case though. When trying to do things such as applying css or using the flickr plugin, after $().load has been performed, I find that the element is not being styled because it hasnt yet been inserted. When setTimeout is coupled with it, it works. Why is this happening?
[jQuery] Select. Need some help ... Urgent. Thank You!
Hello, Does anyone knows a good plugin to restyle a Select? Usually the select is replaced by an input and the list is replaced by a div with a unordered list inside. I am using an existing plugin but there are two bugs: 1. In IE the list shows on the right side of the Input and not on bottom; 2. The buttom in the list only shows the list and it does not hide it. Could someone help me in solving these bugs or maybe providing me a good plugin for for this? I am using the following: http://www.brainfault.com/jquery-plugins/jquery-selectbox-replacement/
[jQuery] String compare in Jquery
Hi. This is my first post, and I am a total jquery noob; so please forgive my lack of ediquite and knowledge and feel free to correct either. I am trying to discover if my page is valid using the jquery form validation plugin (http://docs.jquery.com/Plugins/Validation) When I run this script, I always get the latter (the "else" option - it can't find either value) if($("#aspnetForm").valid() == "true") { alert("Its Valid!"); } else if($("#aspnetForm").valid() == "false") { alert("Its Invalid!");
[jQuery] JQuery 1.2.6 and JQuery Form Plugin in IE7
I want to upload a file using JQuery Form Plugin but I have some troubles. It work ok with JQuery 1.2.3 but don't with version 1.2.6 and IE 7. In Firefox2 it works great with both versions of JQuery. * jQuery Form Plugin * version: 2.12 (06/07/2008) * @requires jQuery v1.2.2 or later
[jQuery] website
Why is the JQuery website performance so awful and why does it go down once a day...a.k.a right now....? Can we band together somehow and get it hosted on a decent host?
[jQuery] Equivalent of Dojo/Dijit Form.setValues() & Form.getValues()?
I'm curious if anyone know of plugins that provide equivalent functionality to the JSON form binding capabilities in Dojo? serializeToArray() doesn't quite do what I'm looking for. To provide an example, I'd like to have something like: <form> <input type="text" name="username"/> <input type="text" name="details.firstName"/> <input type="text" name="details.lastName"/> </form> that serializes to a structure like: { username: '...', details: { firstName: '...', lastName: '...' } } And likewise, I'd
[jQuery] jQuery and Prototype
Hi, I've been using jQuery for my new website and everything has been working fine, no errors: http://www.aber.ac.uk/designstudio/mike/newnew/newweb/index-backup-14-07-08.html Then I saw this website: http://24ways.org/examples/introducing-udasss/ And I wanted that functionality on my site. So I tried the code (which uses prototype) and my jQuery code stops working. http://www.aber.ac.uk/designstudio/mike/newnew/newweb/ The lavalamp at the top right has stopped working and so has the drop down on
[jQuery] timed show/hide event
I have a simple show/hide event that displays a div when the user clicks on the appropriate link. I want to apply animation to this so that the show/hide event will be automatically triggered every 4 seconds. Here is the jQuery: <code> $(document).ready(function(){ $("#click1").click(function () { $("#design").show(); $("#custom").hide(); $("#balance").hide(); $("#elegant").hide(); }); $("#click2").click(function () { $("#design").hide(); $("#custom").show(); $("#balance").hide(); $("#elegant").hide();
[jQuery] noConflict ?
Did anyone tried to use this plugin with no conflict function? JS engine reports syntax error if I try his: var $j = jQuery.noConflict(); $j.ajaxError(function(event, request, settings){ $j.blockUI({ message: "Error requesting page: " + settings.url}); }); Ayone?
[jQuery] UI Tabs Flashing - style issue or JS issue?
Hi everyone, I need help with my tabs. I wanted to create an auto rotate tabs that is horizontal and not vertical. I've managed to tweak the CSS file and get closer to what I want. However, I have two main problems. Here is my file for viewing - http://www.compasswebservices.com/web/billboard/demo.html Please look at my file in both Firefox and IE7. There are some layout issues in IE7, but I'm not worried about it just yet. I have other problems I would like to solve first. 1. In Firefox, when the
Draggable infos
Hi all! I'm sorry if my english isn't very good: I'm a young french developer, so maybe I don't use the rights words. I need to use the Draggable UI class, but I have some questions: - I want to use onClick() event to start drag, and an other onClick() event to drop the element...how can I change the onMouseDown() and onMouseUp() set by default ? On the online documentation, I don't see any option to set these events... - I need to send an Ajax call before the draggable element was dropped. If the
[jQuery] Best way to emulate a marquee (scrolling text)?
Hi, to start learning the APIs of jquery, I've tried doing some tests, among them a way to simulate a marquee. It kinda works pretty well, but as it has to be in a recursive function to continue scrolling after the position is reset, it tends to hog my CPU (using like up to 20% CPU on my 8 month old macbook). Is there any other way I could accomplish the same without an endless recursive function? http://stud.aitel.hist.no/~biberg/test/js/scroll.html
[jQuery] Namespacing instance functions (plugins)
Hello, Couldn't find this discussed elsewhere, but is there a way to safely namespace your plugin's functions using the $.fn member? An example usage would be to group functionality into logical modules, but instead of prefixing every function name with a prefix, one could simply add the function to an object. Something along the lines of: (function($) { $.fn.namespace = {}; $.fn.namespace.method = function(options) { // iterate over elements return this.each(function() { /* manipulated matched element
[jQuery] sortable with dynamic content
Hi, I have a problem using the sortable function. When I add some new portlet, they don't become dragable or if they do I can drag them onto another section and after they lost their dragable functionnality. I really need help on this topic. Regards, Stan Here's the code that I use. (it comes from this url http://host.sonspring.com/portlets/) $(document).ready( function() { $('div.portletWrapper').Sortable( { accept: 'portlet', helperclass:
[jQuery] Information about jQuery.getScript
I wanted to ask why jQuery authors chooses an XMLHttpRequest for dynamic loading of files instead of DOM Manipiluation (append on head)? I know that DOM Manpiulation offer loading of cross domain scripts but what is the difference in those two methods? In meaning of performance and loading few files at the same time asynchronously? I'll be very grateful for Your answers, Martin
[jQuery] Issues with clueTip plugin on FF2 and A List Apart's "Prettier Accessible Forms"
Hi there, I've been trying out A List Apart's article called "Prettier Accessible Forms" (http://www.alistapart.com/articles/ prettyaccessibleforms/) for one of my projects and I'm finding that, for Firefox 2, clueTip becomes completely disabled when I try to implement the supplied workaround for FF2's lack of support for the "inline-block" CSS property. My JS code is more or less the same as the one given in the article, with a few adaptations: ============================== // only for FF2, as
Next Page