Binding a treeview inside a context menu
function initTrees() { $("#mixed").treeview({ url: "source.php", }); } $(document).ready( function() { initTrees(); $("#myList UL LI").contextMenu({ menu: 'myMenu' }, function(asd,asd ,asd ) { }); }); <body> <div id="myList"> <ul> <li>Item 1</li> <li>Item 2</li> </ul> </div> <ul id="myMenu" class="contextMenu"> <ul id="mixed"> <li><span>Event 1</span> <ul> <li><span>Event 1.1</span> <ul> <li><span>Event 1.1.1</span></li> </ul> </li> <li><span>Event 1.2</span></li> </ul> </li> <li id="36" class="hasChildren">
datepicker focus steal (for lack of better word)
Hi I have an external js library that I use to create tooltips. That's all the library does. I generate tooltip content dynamically depending on items the mouse hovers on. On this tooltip I use an input field to allow the user to choose a date. For date selection I use datepicker. The problem: The tooltip works in such a way that if the mouse goes out of the tooltip area, it will disappear. So when the mouse is moved to the datepicker, the tooltip is gone and only the date picker remains. What I
Jquery lightbox with comment box
I got an light box coding in jquery it will show an image . now i need to alter the Jquery to add some comment box with the image . i tried to do that but comment box keeps on increasing i dont know where to insert the code any anyone help me with this (function(){ /* Private variables */ var overlay = $('<div id="galleryOverlay">'), slider = $('<div id="gallerySlider">'), comment= $('<div class="fb-comments" data-href="http://www.bluetopten.com" data-width="350" data-num-posts="10">'), prevArrow
jqm 1.3.0 slider refresh not working
hello everyone, yesterday i update jqm to 1.3.0, but I found that slider refresh does not work, my code: the js excuted but ui not refreshed <button id="change-button" data-icon="add" data-theme="d"></button> <select name="weather-option" id="weather-switch" data-role="slider" data-mini="true"> <option value="off" selected="selected">关闭</option> <option value="on">打开</option> </select> <script type="text/javascript"> $("#change-button").on("click", function(event)
how to bind focus and blur to a new element?
Hi, I am having trouble binding focus and blur to new elements. I have the following HTML code: <div class="ticket"> <input class="firstname" name="firstname[]" title="First Name(s)" value="" /> <input class="lastname" name="lastname[]" title="Last Name" value="" /> <a href="#"><img src="/images/admin/DeleteRed.png" /></a> OR <a href="#" class="add">Add more</a> </div> I then have the following jquery code attached to 'Add more' hyperlink: $("body").on("click",
can rows be labeled or titled with jqgrid?
Hi. I'm using jqgrid and want to make labels for the rows as well as the columns. In the options there is colNames but nothing like rowNames in the docs. Can the rows be labeled/titled also? Right now I see numbers for the row labels. I'd like to remove those and replace them with title words. Dan
How to save state of the page same on next run with movable and sortable items?
I have a page created with div.columns and div.items. All the items can move from one column to another and also you can sort the order of the items inside the columns (something like the portlets sample on jQuery demos). Is there a way so save the current state of the page layout so I can see the same layout when I (or someone else) opens the page next time?? If possible what solution you propose and how to do it? Some demo or sample link?
jQuery .match multiple words
Hello, I have a variable .match and it is working fine when I am looking for one word or two words next to each other. example one word: var car = !! entry.content.$t.match(/car/i); "This is a blue car" --> true "This is a red car" --> true etc... and "add" the color to my car: var car = !! entry.content.$t.match(/ blue car/i); "This is a blue car" --> true "This is a red car" --> false etc... But what I need the match of two separate words in a sentence like: "This car has the color blue" -->
how can I use panel widget in content view port
Hi everyone. I'm beginner...I use header nav-bar. and want to use panel widget. but now, when open panel, panel hide nav-bar. I want to in place data-role="content" and not scroll panel. anybody some idea ?
Having trouble with tabs appearance
Hello, I'm trying to duplicate the appearance of tabs (see below) where the green coloured border goes behind the active tab but overlaps the inactive tabs.It's also thicker than normal. After modifications, especially to .ui-widget-header { border-bottom: 4px solid green/*{borderColorHeader}*/; color: #222222/*{fcHeader}*/; font-weight: bold; } .ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 4px; margin: 0 .2em 1px 0; border-bottom: 0px !important; padding: 0;
Nearest location on JQM?
Is it possible to add a button in JQM for "Near My Location" to find the nearest local office? If I have 15 locations in Western Canada, can JQM point me to the nearest location using the geo location info from my phone? Not trying to make a big development project, but trying to determine if there are any simple solutions to this geo location feature for a company with multiple locations? Thanks!
jquery sortable not working well with li widths
I can use jquery to sort an individual list and sort between lists. However when I attempt to do both, the individual sort works really poorly. (Seemingly can only find room at the end) It seems has to do with specifying the width of the li. Any ideas. Thanks all - ive been struggling for too long. Website its located at is : http://s95311055.onlinehome.us/midwives2012/sortFields-test.php <script> $(function() { $( "#category1, #category2, #category3,#removed" ).sortable({items: "li:not(.ui-state-disabled)"}).disableSelection();
iPhone Flicker Issue When Expanding Collapsible Section
Just wondering if anyone else has seen this flicker issue when expanding a collapsible content section. I'm using an iPhone 5 with JQM 1.3. I have a collapsible like this: <div data-role="collapsible" data-theme="b" data-content-theme="d"> <h4>Heading</h4> <p>I'm the collapsible content with a themed content block set to "d".</p> </div>
Help on menu click
Hello guys, im new to jquery, i got this code from another site, and i dont know how to change it properly. $(function(){ var menus = $("#individuals, #institutions"); menus.click(function(){ menus.not(this).removeClass("menu_ativo_english"); $(this).toggleClass("menu_ativo_english"); }); }); PS: "#individuals" and "#institutions" are the menu id's. "menu_ativo_english" is the class that i used to change the background of the current ID. im using
At a loss with responsive grid that works in JSFiddle, and not locally
Hello, I am ready to pull my hair out on this one :) This fiddle works just plain-old-awesome in IE 9, Firefox, and Chrome: http://jsfiddle.net/JXY6E/1/ And, below is basically, to the best I can tell, the same exact markup, but in Internet Explorer 9 it always loads with the blocks stacked on top of each other. I am at a total loss why this is happening. What's worse is that the example pages on the documentation site also work great in IE 9 for me, these ones: http://view.jquerymobile.com/1.3.0/#/1.3.0/docs/widgets/grids/
How to put a button next to an input box on Firefox?
Hello, I'm using jQuery Mobile 1.3.0. How do I put a button inline and right next to (after) an input box on Firefox? I have a fieldset element to keep the label and text box inline with each other, and then have an icon-only button immediately following the text box. It works on Chrome and Safari, but the problem is that on Firefox the icon-only button is vertically pushed down a bit from the label and the input box. I tried using a negative margin, and also a negative top value, to move the
Trying to Enable Insertion of Black Overlay Div on Successful e-mail submission
Hello everyone, I have a question that pertains to inserting a div that disables all the elements inside the body of the page and has an opaque black overlay while displaying a 2nd confirmation form on top of it. I have placed the second form outside of the page's container div. The jQuery involved starts with a .submit() event listener which fires off an .ajax request to a PHP script that tests the user's submission and removes any harmful hijacking code (I believe this may be where the jQuery is
How to prevent viewer download of mp3 file from jplayer site
Is there a way to prevent the viewer download of mp3 files from a jPlayer list on a site?
Why am I getting this "Stop Script" message in IE7/8 when using a select list in a dialog?
Hi all, I have a select menu inside of a jquery dialog on a page. The list is fairly long, 1450 items. When it is on the page it's self, it works fine. However when I embed it in a jquery ui dialog and click on it in IE7 or 8 (haven't tested 9), I get the infamous "Stop running this script" error, and the menu never opens. The page uses the jQuery validate plugin on the form, but removing that doesn't fix the problem. There is no other JS attached to the menu.
Jquery and sqlite
Hello everyone, I am building an offline application using sqlite on phonegap, and my Jquery versions are 1.2 for mobile and 1.8. My code did not work, i don't know if this is the right way to store date into database. The timeFunction is called on 4 different buttons depending on which button the user clicks. For example, if morning button is clicked and then the the ok button which calls the timeFunction is cliked, i wouls like the data to be stored in the morning column. Below are both codes.
2 lists one sortabel one draggable.
I have a list of items on the right of the screen, I'd like to be able to drag from this list and drop the items onto a list in the middle of the page which is sortable, I need the original list items to stay in place so that you can go back drag them on again. I have the sortable list in the middle of the screen, and the list on the right is draggable but how do I make the draggable items droppable onto the sortable list in the middle of the page? Its not connected lists I would like to use
how to delete the droppable element in a container
my coding is here: <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title> UI Droppable</title> <link rel="stylesheet" href="css/jquery.ui.all.css"> <script src="js/jquery-1.9.1.js"></script> <script src="js/jquery.ui.draggable.js"></script> <script src="js/jquery.ui.resizable.js"></script> <script src="js/jquery.ui.selectable.js"></script> <script src="js/jquery.ui.droppable.js"></script> <script src="js/jquery.ui.mouse.js"></script> <script src="js/jquery.ui.position.js"></script>
jqm 1.3.0 bug? data-role="none" not working under iOS
Steps to reproduce: 1. Create an input element of type "number" 2. Observe that this element uses 100% width 3. Add the attribute: data-role="none" to the input element to leave the element untouched by jQuery Mobile 4. Add the attribute style="width: 50px;" to the input element 5. Observe that the element still uses 100% width under iOS, but under Android, or other web-browsers, the input field's width is limited to 50px. Is this a bug related to jqm and iOS, or am I doing something wrong here?
Possible bug?
Hi, I am new to jquery and trying to use mobile jquery 1.3. I can see that the code after return path.stripHash( newPath ).replace( /[^\/]*\.[^\/*]+$/, '' ); is commented because of the /* character in the above code when I open it in Xcode. Is this a bug? I am trying to use slide navigation and it s not working. Can someone help?? Many thanks
tabs() not working if there is a base href in the templates header
Dear JQuery team, just found an issue with tabs(). I wondered why my tabs content was shown on top of each other in every tab. Reason was a <base href="http://....."> in the templates header. As soon as I removed it the tabs worked well. Maybe this is an issue to have an eye on it for the future. Greetings Bernhard
Filtering Wordpress posts by category without reload (jquery?)
I've been looking around for a way to filter my posts on http://www.waziproject.com/wazimagazine/ without reloading the page. I've had a look at jquery / json & ajax and / or a combination of these. Without avail... The Isotope and Quicksand plugins only allow for the use of 5 categories apparently. So my question is if anyone can help me out to turn the following (see code below) into a list of filters that don't require refresh/reload of the page... The Ajax solution I believe the following answer
swipe panel problem
Hello. I use the new jQuery mobile 1.3.0 and i discovered the swipe panel demo. I implement it on my web site (m.optimumgym.fr). It work fine when you launch the page directly but not when you click on the link on the menu (the swipe panel) The exemple code of page : $( document ).on( "pageinit", "#demo-page", function() { $( document ).on( "swipeleft swiperight", "#demo-page", function( e ) { // We check if there is no open panel on the page because otherwise // a swipe to close the left panel would
jQuery Cycle: problem with 1 slideshow / multiple pagers
I have two pagers controlling one slideshow; one with text links and one with numbers. The problem is that Cycle is reading the pagers continuously, so on the numerical pager, '1' goes to slide 4, '2' goes to slide 5 etc. Is there a way of using pagerAnchorBuilder foreach pager separately? pager: '.benefitsPager', pagerAnchorBuilder: function(idx, slide) { return '.benefitsPager li:eq(' + idx + ') a'; }, <ul class="benefitsPager"> <li><a href="#">How it started</a></li> <li><a href="#">High
JQuery after ajax postback (jquery events missing)
Hi, I've got a problem that've seen a lot around, although I have not seen a good solution for it. I've got an ajax form (a partial view). When the form is posted and the response reparsed by the browser (ie, the DOM recreated, but only for the partial view) all jquery events on that partial view are missing. Obviously the orginal DOM was destroyed and a new one is build, but shouldn't the new DOM objects be automatically bound to their corresponding events? Some solutions I've seen: 1. to use "on"
need help in query
hi i have below situation: <div id="1"> <img class="close"> </div> <div id="2"> <img class="close"> </div> like this multiple divs which have same image. now i want to write a jquery function, the divs which has these image, on clicking of the image, divs should hide. i want generalize function.. $(this) wont work.so what should i give here.. $(".close").click(function() { $(this).hide(); });
Scrolling text from right to left
Hello; I want the text to scrol from right to left. The text is dynamic from database. What would be the best solution? <div style="width:300px">Dynamic Text Goes Here</div> Thanks
issue with two pagers one with thumbnails and one with numbers
i am using jquery cycle plugin( Scripts/jquery.cycle.all.latest.js) for image slide show. i the slide show i need to display two pagers one is image thumbnails at the bottom and pager numbers at the top . but i geting both thumbnails and pager numbers in both the places (botton and top of the slider) here is my script < script type ="text/javascript"> $(document).ready( function() {$( .slideshow' ).cycle({ fx: 'fade', pager: '.nav' , slideExpr: 'img' , speed: 'fast' , pagerAnchorBuilder:
Multiple sliders - Change event triggers for all input
If we bind change event handlers to slider elements we will get an infinite loop, since each event handler changes the value of the other input. One input changes another, that one's event handler runs (changing the first input) which triggers the first input's event handler, and so on. How do we handle a specific slider? I want to change states for each slider seperately when the change event is triggered for a particular slider.
insertAfter strange behavior
I'm trying to move a div that contains an object element that contains a JW Player. The div looks like this, where it's currently nestled between some p elements: The view above is from the Firebug HTML panel. The jQuery I'm using is $('#container_wrapper').insertAfter('p#crown_li'); After this executes, the player is no longer visible and the HTML looks like this: The div and the object moved to where they should have, but the object element is faded and it no longer displays
Best way to change widget theme after the page is first loaded?
I have some jquery mobile widgets on my page and I want to change the theme used by a button once some other action occurs. What is cleanest way to do this? Thanks,
how can i add close button on a youtube video when itse is playing on a webpage
Hi,, i have a example which you can check it out by http://jsfiddle.net/tJpBY/ link. how can i add close button on top of the video when it is palying.Please help me in this regard. Regards, Krishna H
jQuery dialog not working properly
Hi, I am facing this problem for quite long time. $(this).dialog('close') working fine first time but not second time. I am using ajax, so there is no page refresh occurs. Until ajax call is successful dialog closing properly. And once ajax call is made its not closing even if submit/save button is clicked. Here is my code, CODE: jQuery.noConflict(); function submitDetails() { var inptUserName = document.getElementById('username').value; var inptPassword = document.getElementById('password').value;
hi need help here .. writing a function using query
i have below scenario: <div1> <div2> <div3> all are clickable <div1> click -> <div4> opens, <div5>should hide <div2> click -> <div5> opens, <div4> should hide now on clicking <div4>, <div6> opens everything else should hide. i have written jquery for this, but in separate functons using all div ids separately.. i want to club this up and make a single function.. please tell me hw to do so.. thanks!
Event delegation confirmation
i used to know that this is better $('ul.parent').click(function(e){ if(e.target.nodeName === 'A'){ //the event will bubble [speed optimization] //instead of using $('a').click(function(){$(this).whatever}) } }); in try.jquery.com they say $('ul.parent').on('click','a',function(){...}) // is this the same
T-shirt designer
Hello I really need a t-shirt designer. I have searched the web after a script to use but can not find any. Does anyone in here know of a script? Or can you point me in right direction where to start if I try to build one myself. I know a bit of C# and MVC. The designer have to do this Upload and save pictrures of shirts. Add text to shirts and edit the text such as font, size and color. Have categories with our own prints and just click on them to add to the shirt. Resize, rotate and crop images.
Next Page