jquery accordion question
I have an accordion menu that has 5 sections. When the web page loads, the first section auto expands. How can I set this so everything is collapsed and doesn't expand anything?? $(document).ready(function(){ $(”.accordion h3:first”).addClass(”active”); $(”.accordion p:not(:first)”).hide(); $(”.accordion h3″).click(function(){ $(this).next(”p”).slideToggle(”slow”) .siblings(”p:visible”).slideUp(”slow”); $(this).toggleClass(”active”); $(this).siblings(”h3″).removeClass(”active”);
Customizing size of UI buttons/input elements?
Hey everyone, I am wondering how to easily change the dimensions of the ui buttons and elements. I'd like to make the buttons 44pt height with no additional padding, because right now they seem a bit small on my mobile phone, and I've seen some best practices describe the "44pt rhythm" to be used with mobile devices. Currently I'm overriding the default styles in my own "style.css" by declaring !important styles, but this is a terrible practice, especially if there are a lot of shared classes that
Adding a class to current link
Hi, I've seen this on many sites where the current link in a menu is styled. How do I add a class to a link that is active? Thanks for any help or pointers. Joe
wrapping non-nested elements
Hiya, I would like to wrap the elements in this structure: <h4>header1</h4> <p> some text</p> <p> some more text</p> <h4>header 2</h4> <p>text</p>so I would get two divs, each conatining the h4 and however many p's there are underneath. - and there are up to 10 of these blocks, so I can't do it manually. I tried some nextAll and nextUntil but couldnt get it to work. And since I am new to jQuery I am not even sure if it can be done...? Hoping for help Andreas
Sliding Jquery Menu question
I am trying to figure out how to get this slide out Jquery menu to work. Here is a link to what I am doing http://scottjraney.com/javatest/ I will describe what I am trying to accomplish. 1. When you click on a link, the content related to that link dynamically loads into a slide out Div (this has been accomplished) 2. When you click on another link after the previous action the menu stays visible but loads the new content (this has been accomplished) 3. When you click on the same link a second
conflict with superfish and flot
I'm using the stable version of flot (0.6) and superfish (1.4.8) on the same page. When I have a pulldown superfish menu with items that should display over the flot graph, flot stays in the foreground. It seems this is a problem with superfish, but I'm new to jquery so I was hoping for some debugging tips. I'm using the basic superfish example and a simple line graph with jquery. Thanks.
xmlhttprequest instead of using php in this tutorial
http://net.tutsplus.com/tutorials/javascript-ajax/how-to-build-an-rss-reader-with-jquery-mobile-2/comment-page-2/#comment-358234 Does anyone know how one would use this tutorial and instead of using the php (not compatible with phonegap) use xmlhttprequest... Im having real issues getting it implemented.
Weird Safari Issue
I'm having a weird problem in Safari when I refresh the page. I'm using the fadeIn and fadeOut to display an info menu and am also using slideToggle to slide a menu down when a link is clicked. For some reason, these actions work when I first load the page, but when I refresh it, these actions don't work at all. I am not having these problems in chrome or IE. Anyone else having this problem?
Selecting one image from a table of images
Hi there, I need some advice on how best to tackle building a voting page with Jquery. The basic (rude) layout is here... http://unpackit.org.nz/dev/ Basically my actions are... 1. Voting disabled until user has entered a jquery verifiable email address, this also use ajax to check if there is an existing vote with the email address in the mysql table; if there is it does not allow further and shows a message. 2. When email address entered then user can click on one "best" and one "worst" image,
How can I display a simple button in a list element?
Hi to All, I would like to display simple text buttons )for (example [edit], [reply] ) in <li> </li> elements _without_ became the whole li element to a clickable button. Is that possible? Thx
Jquery Accordion not working in IE7, Syntax Issue?
I built a site that uses using jquery accordion, with some simple functions that control accordion from external navigation links. Ive tested it in all browsers with no problem, but in IE7 the accordion loads completely open and I have no idea why as I am not experienced with JavaScript. using jQuery v1.4.4 below is my code. <script> jQuery().ready(function(){ $('#slide-menu').accordion({ autoHeight: false, navigation: true, active: false, collapsible: true ,
Overlapping sortables, wrong drop target
I have a somewhat complex drag and drop scenario, that's revealing a bug in the jQuery UI Sortable code. This happens in 1.8.9, but I have reason to believe it may have existed in earlier builds as well. Say you have two sortable targets, one above the other. --------- Area 1 --------- Area 2 --------- As you drag your element around, usually the placeholder appears in the correct area. The exception is when you drag the element to the final position in either list. In that cass, there is a scenario
Develop app [load images from my phone to internet]
HI all I am developing an application in jquery mobile and php, i want to load images from my phone to internet, how should i start with it?, I know that it depends of phone model and other features like that, but i wanna start with that and i need some suggestions... thanks..
fadeTo and IE9 RC
Im using fadeTo (From 0 to 1) on a div in my homepage. it works fine with all browsers except IE9. while fadein the div jumps to different position on the page , 200px left and sometimes works fine for 1 sec and jump again... does anyone know how to solve this? my website: http://www.taxteam.co.il/ thanks
IE Firefox positioning issues... I think
Caveat: I'm artist, not a programmer. I pretty certain what I'm trying to accomplish is simple. The effect is to drop three boxes (div containers with images) from the top to a set location. Fade them out, repeat indefinitely. There's a secondary effect to fade in another div but that hasn't broken at all. The issue: per client request, the boxes can't squash (slideDown). So, I'm thinking... set the marginTop to negative number, set the container div overflow to hidden, and voila' sliding boxes.
Syntax Error
I'm trying to put all my scripts into one script file, but when i put jquery in nothing will work because of a syntax error in the minified version. Starting on line 69 there's a quotation mark missing somewhere causing it to not close which in return messes up my comments and scripts below jquery. The uncompressed version doesn't have this error, and i would use it in the file instead except that its over 6000 lines, and makes the filesize large.
Menu and plugins
Hello, I've Wordpress 3.1 installed on my site ( www.caae.cl/wordpress ) First, I used a menu which I found here : http://www.webdesigndev.com/web-development/create-the-fanciest-dropdown-menu-you-ever-saw I installed the menu on a HTML page where I designed everything. It worked perfect. Then I used the HTML and CSS that I've created and used it on my WP theme. It still worked perfect, I was using jQuery 1.5, even thought the menu is supposed to work on older versions (it was made in 1.3.2) The
Target a specific <div>
Hey guys, thanks for reading! I'm in the midst of some volunteer work for my local roleplaying community, creating their website. I want to use a menu bar in the top with a <ul> and simple "a href"'s to switch between the main content. The content of each 'page' will be retrieved from a phpBB board using php. I've chosen jQuery because I want to learn more about it and have stumpled upon this problem: How do I target a div, show that, and then hide the current one (or simply all other divs with a
Validate matrix columns and rows
Hi, I'm trying to validade a table that has 20 checkboxes (5 columns and 4 rows) and that needs to have at least 2 checkboxes checked in each row and column. I've managed to create the validation for the row part (all checkboxes in the same row have the same name). I've also created a custom class rule (all checkboxes in the same column have the same class) but it doesn't seem to work. It only shows the row validation messages (labels that are display next to the last cell in each row) and not the
Parse AJAX content after page load
Hi, I'm using jQuery Mobile and jQuery to insert dynamic content after the page is loaded. However, the new content does not match the look and feel of the rest of the page because the content is not parsed for data-* attributes. How can I make jQuery Mobile parse the new content so that I can insert it into my page? Thanks :)
wrapping non-nested elements
Hiya, I would like to wrap the elements in this structure: Copy code <h4>header1</h4> <p> some text</p> <p> some more text</p> <h4>header 2</h4> <p>text</p>so I would get two divs, each conatining the h4 and however many p's there are underneath. - and there are up to 10 of these blocks, so I can't do it manually. I tried some nextAll and nextUntil but couldnt get it to work. And since I am new to jQuery I am not even sure if it can be done...? Hoping for help Andreas
jquery change function
Basically the idea I want to accomplish here is to kill the defaultCharID and defaultCharacterName session variables and when a new choice is made from the dropdown then create a new sessions with those new data. <?php session_start(); // Access the existing session // Include the database page include ('inc/dbconfig.php'); // Include the variables page include ('inc/variables.php'); $userID = $_SESSION['userID']; $isAdmin = $_SESSION['isAdmin']; $defaultCharID = $_SESSION['defaultCharID']; $defaultCharacterName
what's the purpose of passing "window" and/or "undefined"?
I've noticed the following in the jQuery Mobile source code. What's the purpose of passing window and/or undefined? (function($, window, undefined ) { // do stuff })( jQuery, this )window is global by default correct? and undefined...well, i'm at a total loss. Not even sure what that means. I know i can do a comparison like...if(typeof myvar === "undefined")...yeah, i'm confused :P
Script needs to be below ID's
Following code will not work <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script> <script type="text/javascript"> $('#jQ').click(function() { alert('Handler for .click() called.'); }); </script> <input type="button" value="jQuery" id="jQ">However this works <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script> <input type="button" value="jQuery" id="jQ"> <script type="text/javascript">
Trying to pass dynamically created set of markers to goMap
The client is a realtor with a non-standard intranet which is a "conferencing" system with a very interesting built-in web server (FirstClass). They post property listings to conferences as email messages, with the property address as the message subject. I'm trying to place the addresses on a Google map using the goMap() plugin. I've figured out how to read the conferences and extract the addresses to a web page, either as well-formed JSON or as a string formatted exactly as one would hard code
Lazy loading SELECT options?
I have a list of several hundred items that need to populate a dropdown element. While on a desktop this is (more) reasonable, for a mobile handset this is just way too much data to populate at once. The concept of what I want to do is similar to how the Android market displays apps, where you have to scroll to the bottom of the list for more items to load. Has anyone worked out a good method of "lazy loading" items for a dropdown?
Andriod & Jquery
Can Jquery work on the Andriod platform (Andriod 2.2 browser)? I attempted to use jQuery to create a game. It works fine in Safari, Firefox and the iPhone, however, on Andriod I get random syntax errors in jQuery.js. The syntax errors change lines on every line, so I do not believe it is an issue with the specifically. Is there a mobile version (not Jquery mobile as I want the power of jQuery not a interface framework) that is appropriate for Andriod? Thanks.
JQuery Ajax - Request sending
Hi, This is my first ever application in PHP,Mysql and JQuery. I am novice in all of these technology and learning through the manuals and books. I got stuck into a situation where I am using JQuery's ajax method to submit a form.. I want to pass the url as "index.php?action=product" to jQuery.ajax's url parameter and the type parameter is "POST". Check out my code below.. $.ajax({ type : "POST", url : "index.php?action=product", data : strPostData, success : function(msg){
CONTINUOUS REEL SLIDESHOW
I don't get it, where's the Continuous Reel Slideshow code: http://plugins.jquery.com/project/continuous_reel_slideshow? Is this thing any better than http://developer.practicalecommerce.com/articles/1840-Full-360-Degree-Product-Image-Rotation-in-JavaScript? Confused? you will be..!
Accordion Panel Size
Hello, I have another question about the accordion plugin. I have 3 panel with different lenght of text, I don't want to have the scroll in the panel since in IE does not work. It's ok to me to have the same pixel height for each panel but how can I set the height of the panel deciding not to have the scroll bar? Thank u very much
Cookie expiration date not being set right?
Hello all, I need some quick help with one of my scripts. It's supposed to set the expiration date of all the cookies on my page for one year, but it's not working. I know it's not working because Safari lets you see the expiration date for each cookie set on a page, and it didn't show it for the elements being set on my page. I'm using jQuery for this, so heres my one script: var currentRotation=null; function checkOrientAndLocation(){ if(currentRotation != window.orientation){ setOrientation();
Obfuscation of JS files
Hi, I have a custom download of JQuery 1.7.3. Thus got 2 .js files named jquery-1.3.2.min.js and jquery-ui-1.7.3.custom.min. Since there will be 2 seperate http requests from client to download so i want to merge both of them into a single .js file. Can i do this? if yes, how can i obfuscate the merged file to reduce the overall size? Thanks
Better control over Autoscroll
I developed an application that uses Autoscroll and combines some other plugins and custom jquery. I am looking to harness the autoscrolling a little bit better. The main issue that I am seeing is that when a video or slideshow (Flash slideshowpro, or youtube embed) feature is clicked and the video or slideshow begins playing in a simple lightbox (custom developed - iframe), the video/slideshow is very choppy. I believe (but not sure) that this is due to the browsers resources being used up on the
jQuery and Dreamweaver cs4 Problem
I am in the process in teaching myself web design, I know how to do basic CSS and understand code quite well, however, when ever I use jQuery I get "there is a syntax error on line..." I have followed two seperate j Query tuts and have also copied code off other sites and still get this error through my code on different lines alll thhhee tiimmee... At first I thought it maybe something I was doing but now I am thinking otherwise. Here is a screenshot of my code, I hope you are able to get back to
JSONP in Jquery.POST()
Hi, Is it possible to implement JSONP with POST and PUT ? When i try to do $.POST with datatype as JSONP , I could see that the request is sent as GET and not as POST. Is it possible to achive JSONP with POST ? Thanks, Pradeep.
jQuery Cycle 1 pixel shift after animiation
I am using cycle to animate 4 div's on a website I am working on. On some versions of IE 7 and 8 as the cycle plugin animates between 'slides' it appears to shift the slide 1 pixel to the right then back 1 pixel to the left. Here is the site: http://westfield.peex.co.uk/ I cannot get to the bottom of this issue as the CSS all validates and I have implemented the cycle plugin correctly. Any help would be really appreciated as I am now stuck for a solution.
Adding a draggable to a sortable
Hi All, How to add a draggable to sortable programatically ? <script> $(function() { $( "#sortable" ).sortable({ revert: true }); }); $(document).ready(function() { setTimeout("add()", 3000); }); function add(){ var $obj = $( "<li class='ui-state-default' id='d7' >Item 7</li>" ); $obj.draggable({ connectToSortable: "#sortable" }); $obj.appendTo($('#sortable')); } </script> </head> <body> <ul id="sortable"> <li class="ui-state-default" id="d1" >Item 1</li> <li class="ui-state-default" id="d2">Item
I'm getting 3 mails / new message after clicking 'Follow this topic' ....
When I have clicked 'Follow this topic' I receive 3 mails / new message. One real one with a subject: New response to Max-width isn't set in IE But two with the following subject: Re: [WatchList] Max-width isn't set in IE Christophe http://www.opera.com/
Fancy box gets hidden in frames having a pdf
I am using frames which has a dynamic PDF showing in it. There is a link on the left menu frame that opens up a fancybox. Looks like because of the pdf the fancybox gets hidden behind the pdf and is not visible. Is there a way to bring the fancybox completely to the front
Tap with live event does'nt work anymore, and form problem
Hi guys, I have a problem with labels and submitting form with JQuery Mobile. I'm programming a login form. When i submit it, my DOM isn't reload (I don't know why...) ! So all my events works thank to live() event, except "tap" event >< When I refresh my page by cleaning the URL, all my events works fine, like bind("tap", function(e){ ... So have you got any idea why my DOM isn't working after submitting a form, or how to debbug "tap" with live event :s ? My examples: #checkbox-label is a label
Next Page