"Refresh" event handler?
Hi! I'm trying to change an image class by clicking on it, like this: $('img.closed').click(function(){ alert('I`m closed'); $('img.closed').prop('class', 'open'); } $('img.open').click(function(){ alert('I`m open'); $('img.open').prop('class', 'closed'); } Although after a click I see my image with a new class, the old handler is still being called. Why is it happening and how can I avoid it?
Something screwd up between 1.6.2 and 1.7.2
Here's my code that works perfectly in 1.6.2 and fails in 1.7.2: var crappyHtml = " <span id='span__bk8100030023000300130003002300' isContentType='true' tabindex='-1' class='ms-entity-resolved' onmouseover='this.contentEditable=false;' onmouseout='this.contentEditable=true;' contentEditable='true' title=''><div style='display:none;' id='divEntityData' key='__bk8100030023000300130003002300' displaytext='020102-Цех 1 Новосибирск' isresolved='True' description=''><div data='<ArrayOfDictionaryEntry
Collapsible div within a collapsible inherits events bound on the parent?
Collapsible div added to another collapsible div inherits the events that are bound on the parent collapsible. Is there a way to stop that or am I doing something wrong. Say for example I create a collapsible div and add another collapsible div to this div. Now if I bind collapse and expand events on the parent div the events are also fired for actions on the child div. See the jsfiddle example - http://jsfiddle.net/UQWFJ/58/ If I bind the expand and collapse on the parent the child also has
Calling a jquery function on DOM load
Hi Everyone, I was wondering the correct way to call a function when the DOM loads. For example: $.fn.doThings = function() { ...do some stuff }; $(document).ready(doThings); Any help would be appreciated. Thanks
nth-child() - sets of 4?
I'm using this function in my navigation: $(document).ready(function(){ $('ul.tabNav a').click(function() { var curChildIndex = $(this).parent().prevAll().length + 1; $(this).parent().parent().children('.current').attr('id', 'idle'); $(this).parent().parent().children('.current').removeClass('current'); $(this).parent().addClass('current'); $(this).parent().attr('id', 'current'); $(this).parent().parent().next('.tabContainer').children('.current').slideUp('fast',function() { $(this).removeClass('current');
I've made a jQuery menu in JSfiddle but when pasting to Dreamweaver it doesn't work. Could it be some syntax error? Could it be that I´ve made a mistake?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script type="text/javascript" src="jquery-1.7.2.js"></script> <script type="text/javascript"> jQuery(function($) { $(document).ready(function() { $('#panelHandle').click(function() { jQuery.noConflict(); if ($('#sidePanel').offset().left < 0) { $('#sidePanel').stop(true,
substring() doesn't work
I want to delete the first 3 characters of my a element. I tried several opions, but none of them work: $('.ouder-item a').text().substring(3); $('.ouder-item a').html().substring(3); $('.ouder-item a').substring(3);I know that I call the right elemet, because the following works correctly: $('.ouder-item a').removeAttr('href'); Does somebody know why it is not working or what i'm doing wrong?
Scrollbar not visible in jquery mobile app
I am working on a jquery mobile app which uses phonegap. In the app, I am dynamically loading a listview in a page with number of items greater than what can be shown on a single screen. When viewing in android emulator (Android 2.2), the listview is shown fine, and I can swipe or use the buttons to scroll down, but the vertical scrollbar is not visible. Do I have to do anything special for the vertical scrollbar to show up? When I open a static version of the page in a browser (Firefox), the scrollbar
strip outerHTML from html string
Hi, Considering I have a HTML string like this: <span><span><div>this text</div></span></span> I want to get the left side of the outerHTML as a string as well as the right side: var leftSide= <span><span><div>; var rightSide= </div></span></span>; Is there a way to do this? Regards.
Dropdown accordian menu
Hi guys, I have an interesting problem. I've got a client who wants a different type of menu and although I've searched everwhere, I still haven't found a solution. So basically I need a 3 part menu. 1. Main menu is a dropdown that is activated when clicked and the sub-menu appears. 2. Sub-menu 3. Some of the sub-menu links need to be an accordian if they have sub-sub-menu links. Here is the code I have so far, although I've only managed to get the dropdown working, but it's not working properly
Modifying jQuery plugin [URGENT]
I want to modify the Drill Down charts plugin here. I need to make a minor change. Currently when you click on a bar, it automatically zooms in ("drills down"). Instead, I need to make a dropdown menu appear on clicking a bar, from which the user can choose a category to drill down from. The core components would stay the same including the "drill up" function, but I need to create a variety of options from which to "drill down." Does anybody know the easiest way to do this? I need an answer urgently
HOWTO: Long ListView wirh thumbnail delay loading ?
Hello, I need a help. I have a long ListView with thumbnail icons. Like this - http://jquerymobile.com/demos/1.1.1/docs/lists/lists-thumbnails.html How do I tweak the system so the, at 1st only the items which are being shown on the screen, those thumbnail will be loaded. Then if the user scrolls down, more thumbnail images will be loaded. that is as the user scrolls down, the images will be loaded. Same thing happens in Facebook Timeline. Try to see the old posts.... I don't know how to do this
Gallery plugin fullscreen
Hello, I'm trying to make fullscreen example from this one http://dimsemenov.com/plugins/royal-slider/video-gallery/ But it ignores height: 100% scales height, do you know how to remove this? .royalSlider { width: 100%; height: 100%; } Documentation can be found here - http://dimsemenov.com/plugins/royal-slider/documentation/
jquery mobile slider
Hi, I am new to javascript / Jquery Mobile. I had created slider in my web page using jquery mobile UI, These are my JS files. <script src="resources/js/jquery-1.7.1.min.js"></script> <script src="resources/js/jquery.mobile-1.1.1.min.js"></script> <link rel="stylesheet" href="resources/css/jquery.mobile-1.1.1.min.css" /> Slider div <div id="agediv"> <label for="ageslider-0">Age:</label> <input type="range" name="ageslider_r" id="ageslider-0" value="00"
Submit Form when AJAX Call is done
Hello, i would like to do an API call when a form is submitted. The result should be stored as hidden input. My Problem is, that the form is submitted just before the ajax call is ready. Here are some simplified code snippets: $("#MyForm").submit(function(){ $.when( api_call() ).then( form_submit($(this)) ); console.log('Not Submitted'); return false; }); function api_call() { console.log('AJAX Call'); return $.ajax({ success: function(){ //
iframes, parent and child documents
Hello: I'm putting some finishing touches on my website. One is to insert links from one part of the page/site to another part. For example: At this point I'm trying to get a button on a parent document to add and remove classes of an element in a child iframe. I've successfully moved focus to the iframe, but can not change classes of the child element. Following is my syntax: $('.ref_bttn').click(function() { $('#client_content').hide(); $('#ref_content').show();
Beginner who has general questions about using AJAX in a control panel
Hi, I am looking to update information in real time on my backend panel through my website. My designer has been telling me integrating AJAX is very expensive task to do and implement on the backend of the site. I am looking for AJAX like updates to take control at certain points during a process. All i would need it to do is update my database and show the change on the front end of the website. For example, when a customer rates a provider I would like the rating to automatically occur without
Looking for floor map
Hi, I came across this Flash based floor map http://www.southlakeregional.org/SL_Wayfinder_ThisOne.swf. I was wondering if there is a jQuery plugin that would do this kind of map. Thanks in advance. Joe Green
How is lazy loading done?
I been looking at many lazy loads scripts. Most show a image html tag with a src to be where a blank image or a image that is basic looking. Then they use data-src="real_image_here" which is where the real image location is stored. I would like to know how to do lazy loading manually. I want to lazy load all images when they are in the view port. How can I do this?
I have a problem to tool tip on mouse over.
I am add the tool tip functionality with joomla CMS. but error occur Uncaught ReferenceError: left is not defined rfid-reader:65 6Uncaught ReferenceError: tooltip is not defined rfid-reader:183
Super Simple Slide Show
Hello... For my 4th year thesis i want to make a interactive comic book (Basically just a slide show) Functions: -Click advance through images of identical size -Lots of images... in the hundreds -No Adobe flash -> I want this to work on Apple Products too. -If possible, gif animated pictures thrown in at some points. Here is a demo of the concept made in Flash: Prototype Comic If you help i will draw you a picture of any video game character you want in this style:
Where is the problem, click event is reloading page.
Hi, I1ve made this page. http://www.multiversso.com/gbrow/new_portifa/index.html where a click event do an animate function on a class, but the content is reloaded and the page returns to the original state. can someone tell what I`m doing wrong?
isotope plugin
Hi everyone, I am using the isotope plugin: (http://isotope.metafizzy.co) in a project. It sorts elements quite nicely. They have a sorting method for elements called random. Example : http://isotope.metafizzy.co/demos/sorting.html Documentation : http://isotope.metafizzy.co/docs/sorting.html When I use the random function all the items sort as they should. My problem is: I want to select the visible elements in the order they are seen after sorting randomly. Please let me know if you have any ideas
Update content on mobile website
Hi, I am new user of jquery mobile, i want to make a mobile version of my website with the help of jquery mobile framework, so i want to confirm this, is that possible that if i will update content in my desktop website it's also update on mobile website simultaneously. Please help if it's possible
Jquery Plugin for multi-page form
Hello, I have in my site a mutli-page form : the user starts a campaign and so inputs a serie of texts. Does it exists a really cool designed jquery plugin ? Best, Newben
Desktop & Mobile both w/ JQM?
I've looked at several discussions of whether or not JQM can be used both for desktop browsers and for mobile devices. Unfortunately they are divergent, probably because JQM is so new (and great!). So as a noob, and someone looking for a reasonable, simple JQ UI solution, can I use JQM for both my desktop pages and mobile pages? I was hoping I could just assign a div to JQM and all would be fine. Would that work? Also, the group I work with is building both desktop and phone sites, so if we could
How to make CSS style for sertain date at Keith Wood datepicker plugin?
For example, how to make red background only for Jan 7 and Oct 31? At the moment I did this ajustments: http://jsfiddle.net/neoandrej/wjwa5/2/
Could you show how we can open a specific tab in the accordion from another page?
Hello, This is my question from stackoverflow.com: I have been following tutorials from "learnnerd", a Youtube contributer. http://www.youtube.com/watch?v=WjHt_v6nK_E&list=UU08OUGXLKqlnADsUDqA8evg&index=2&feature=plcp have made my website using the codes he provided. Here is my website: http://www.alliedantennas.com.au (check services) I would like to link a tab on my home page to open a specific accordion in my services pages. I've researched but still know little. I don't know much about
bind a function to all "select" that runs on change
Hi guys, I hope someone can help me out here... I'm pretty new to jQuery and am trying to attach a function to the change event on all the selects on a window, but I don't really get how to do it. This is what I have thus far: $("select").each($(this).change( function(){ alert($(this).val()); } ));
Multifile upload problem with no attached fles
I'm having a problem using the MultiFile plugin with Spring MVC. It works fine when one or more files are attached; however, it fails when no files are attached. From Firebug the request is: -----------------------------23805158906729 Content-Disposition: form-data; name="ksUrlId" 5 -----------------------------23805158906729 Content-Disposition: form-data; name="ksUrl" http://localhost:8080/sadlserver-cxf-service-1.0.3/SadlService -----------------------------23805158906729 Content-Disposition:
help - blueimp jquery upload widget partially overwritten by appended view
I am using codeigniter 2.1 along with the blueimp jquery upload plugin. I am now trying to use the plugin as part of a dynamically generated page, made up of several views. To do this my controller contains the following: $this->load->view('blue_view_widget'); // the file upload view $this->load->view('form'); // a form I now see that the template-upload and template-download table (which is generated by javascript) is overwritten by the html from the form view. I'm thinking ( maybe incorrectly
audio player which can play m4a, is there any jquery player?
Hello guys, I need html audio player which can play m4a, I have been researching from the web but I couldn't find anything. Is there any jquery audio player which can play m4a? or do you recommend me any audio player? In addition, it should be easy to implement. In other words, I just need simple audio player which support m4a. Thnaks for your help.
Using a lightbox with "download hi-res" link
I need a simple lightbox where below each photo there can be a small link to download a hi-res version. I have tried at least half a dozen and none of them have this feature. If I were a more sophisticated coder, I could probably customize one, but I dont really know javascript, just html/css. Can someone recommend a jquery lightbox that will allow this (easily) or give me straightforward instructions on how to add it to an existing one? In terms of the light box, I don't want all the bells and
query not refreshing data
hi i have setup a rest service that is exposing some data via get. i can consume the service with jquery and show it on a html page. my problem is the data does not refresh. to get the current data i have to close all browser tabs and reopen. scenario : 1 - wcf exposes a 3 records 2 - jquery html client web page consumes the service and shows the 3 records , working on workstation 1 3 - add one extra record from workstation 2 4 - on workstation 1 if i refresh nothing happens.....i have to
validation doesn't seem to be working properly
Hello, I have a problem with validation plugin. It was working but now it doesn't. I don't know why this has been happened. the question is on stack-overflow. http://stackoverflow.com/questions/11719424/validation-in-jquery-doesnt-work and here is the code that I have written. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"
how programmatically set button pressed state
I have some buttons on my JQM website that have regular anchors to them. When I have pressed one it turns green (that's the pressed state I suppose), which is good, then the next page loads and shows. Now when I make such a button without an anchor it doesn't turn green when pressed anymore :(. I bind events to those buttons to make a back button and a to top button. The user doesn't get any feedback when they touch them. Is there a way to force such a button into its (un)pressed state? (empty anchors
Simplest slider - Ever! (That dosn'tt work properly)
I have been playing about with Snook's code. I liked it because it was really simple, and my coding skills are very basic. I have modified the effect and how it is triggered. The setInterval is triggering off the image rotation, Then the frwrds div/button is jumping in to trigger the next image. What I would like to do is, when frwrds button is clicked, I would like the setInterval to pause for a couple of seconds. Dose anybody have any ideas how do do this a simple as pos? My code-age:
Get a td's title attribute.
Hi, I have a table that has many cells. Each cell has different title attribute. My original code was to get the text of a cell. How to modify it to get the cell's title attribute? var showTooltip = function(event) { var authorName = $(this).text(); $tooltip .text('Highlight all articles by ' + authorName) .show(); positionTooltip(event); }; Thanks.
Can't print all selected results from a custom select menu in JQM 1.1.1
With custom select menus, I am finding no way to show "all options were selected". Is there a way with ether javascript or PHP to show what options were selected from a single custom select menu? This is the code I have in my HTML <div id="ordersteak" data-role="fieldcontain"> <label id="labelsteak" for="select-steaks" class="select">Steak</label> <select name="select-steaks" id="select-steaks" multiple="multiple" data-native-menu="false"> <option>choose
jQuery malsup Form Plugin Ie 7 failing
Hi I'm Using the plugin from http://malsup.com/jquery/form, which works fantastically in FF and Chrome but is throwing errors in IE 7 which is a pain as most of the users will be using I.E. I am using * jQuery Form Plugin * version: 3.09 (16-APR-2012) I have tried both jQuery 1.4.2.min.js ans 1.7.2.min.js libraries I have switched on IE debugging and it is reporting: Runtime error Line: 121 function expected this is the line the debugger is highlighting: // give pre-submit callback an opportunity
Next Page