json not working
<script> $("#clearPoints").click(function(){ $(".point").remove(); }); function LoadFactions(){ $("#actBox").hide(); __t = -1; __f = -1; $("#factlist").empty(); $("polygon").remove(); $(".point").remove(); $(".captionzzz").remove(); $.post('engine.json.html', function(data){ var f = jQuery.parseJSON(data); f.factions.forEach(function(faction){ _factions[faction.id] = faction; $("#factlist").append("<li class=\"fact fact"+faction.id+"\"><div class=\"factSquare\" style=\"background-color: #" + faction.color
Jquery plug in url issue
I am creating my first jquery plug in when I click on the logo the recording of the user appears and user can listen to it,I have done this as follows: (function ($) { "use strict"; $.fn.myfunction = function (options) { var settings = $.extend({ //default isstatic: false }); var options = $.extend(settings, options); //Iterate over the current set of matched elements return this.each(function () { var obj = $('.mydiv2'); obj.hide(); $(this).show(); $(this).click(function () { obj.toggle("slow");
dropdown list not working after cloning
I have the following code for cloning the cascading dropdownlist...it is working when the page is loading ...but after adding a dynamic row the dropdownlist in the newly added row is not working...Please help me... <!DOCTYPE html> <html> <head> <title></title> </head> <body> <table border="1" id="table"> <tr><td> <select id="cat"> <option value="c">A</option> <option value="p">B</option> <option value="n">C</option> <option value="k">D</option> </select>
Uploading content blocks and pages entirely
Hello . Does not solve the problem . But the problem is the following . Now done uploading via ajax entire page , here : $(document).on('click', '.link', function(e){ e.preventDefault(); var link = $(this).attr('href'); if (link == 'index.html') {$('#content').prev('.slider').show();} else { $.ajax({ type:'post', url: link, success: function(mes){ $('#content').prev('.slider').hide(); $('#content').html(mes); } })} }) But there is a need to load not only the entire page , but just some blocks from
how create a simple slideshow and some controll buttons.
Hello again, I am trying to make this little slideshow, it works, but i can't write correct function for buttons click. i want every time that a button is clicked, its related div display. and then slideshow continue its way. thank you all. demo: http://jsfiddle.net/sabeti05/dsagcc5u/ html <div id="slideshow"> <div class=" hide block"> one </div> <div class="hide"> two </div> <div class="hide"> three </div> </div> <button
Help to change bar color of Easy Pie Chart with click event
I'm using Easy Pie Chart and this is working well with the following code: $('.chart').easyPieChart({ size: '150', easing: 'easeOutBounce', barColor : $(".cbg").css("backgroundColor"), onStep: function(from, to, percent){ $(this.el).find('.percent').text(Math.round(percent)); } }); I've a color switcher that switches the color of my theme. Now I want to switch the color of the bar with the color of the theme. So I write the following code. But it is not working.
Not Able to Get Height of Position Relative Element Using jQuery
I need to have a position relative div plus some some position absolute contents inside it. Now I am trying to dynamically calculate the height of the #one and then apply it to top of #two at this demo JSFIDDLE but I am getting 20 (it seems it is not calculating the height of the image inside the #one! can you please let me know why this is happening and how I can prevent it? $(document).ready(function() { var contentheight = $('#one').height(); console.log(contentheight);
How can this verbose jQuery be elegantized?
I have 5 rows that each have an identical selection element (or dropDownList) in the first cell of each row. Choosing a value from that populates the values in another selection element. How can I populate the selection items, and in a way that is less verbose than the "brute force" approach here: $(document).on("change", '[id$=ddlPaymentType1]', function () { var value = $(this).val(); if (value == '1') { $('[id$=ddlAccount1]').text("Replace this with the values for
How to get the default currency and percentage symbol using globalize 1.0
How to get the default currency and percentage symbol of particular culture using Globalize 1.0 file and how to change the symbol dynamically. Please help me to find the solution... Thanks
Jquery Ui Tab for displaying view as content in each tab
I am trying to Jquery UI tabs How do I go about loading different views as a content for each of the tabs. Currently I am not doing it the right way but the code snippet is posted below: Code in the _layout.cshtml is <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>@ViewBag.Title - CSTES Application</title> <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" /> <meta name="viewport" content="width=device-width" /> <script
Why my code jquery doesn't work ?
Hello, I have a simple form, I want to do this control in my field "phone" : required + digits. Code : http://codeshare.io/fGxgD My control doesn't work, where is the error ? I try Firebug but it doesn't detect errors.
Jquery UI still alive?
Hi I just downloaded the UI and when I opened the index page in Chrome and IE, some controls were not properly displayed, just like the plugin was never finished. Are there any issues with the plugin? The plugin has several JavaScript files. Same thing with CSS files. Which one should I insert in my ASP.NET web site? The docs shows only 3 references but I see many. Please provide examples as I am a newbie with JQuery. regards, Acheo
new tab clicked and page render finished
Hello... When I click a new tab, I need to be notified after the new tab has become active and rendering is complete because I need to get newly clicked tab id and dimensions for elements on the page (position x, position y, width and height) for each. Is there an event I can capture when this is complete. I am doing this on the creation of the widget using following jQuery deferred: $.when($("#tabs").tabs()).then(function () { // read position x, position
Jquery dialog popup issue.
Hi Guys, I am experiencing an issue with Jquery dialog popup . Whenever I scroll down the content and close the dialog, the focus is not getting automatically returned to the element that had focus when the dialog was opened. After the occurrence whenever I open a pop up, I have to manually scroll to view the pop up. I am seeing this issue only in chrome. Can you help me out in solving.
how to modify the css for jquery slider
hi everyone i am trying to adapt the jquery slider to my website. jquery slider i have got it working-however i seem to have missed the css setting. the slider bar covers the entire page. the slider on the site is very small and slim, yet the slider on my site is huge. can someone please tell me how to change its setting. i tried to run the code on jfiddle but i could not get it to work ; j fiddle i guess what i am really asking for is an example from somone of how they have modified the slider .
stop page unnecessary scrolling
hi all, i am using jqm 1.4 in webview, in ios android. my problem s, in case of 2 or more text boxes, the last text box, which is copletely visible, is pushed up when on focus, keyboard appears. also header and footer scrolls up. i need page scrolling to happen, only if absolutely necessary, also to just an extent that it is available just above keyboard end. i found a solution, but that is phonegap plugin which showed up native keyboard, but i cant use it, because i am not using phonegap, just
problems updating Adobe Dreamweaver CS6 jquery mobile versions
First of all I want to thank Nancy for her help, it helped if I was going to download jQ and jQM to page. But I want to keep them jQ&jQM local. I am building a mobile app and I would like to use the jQuery Mobile with theme (local) template. Currently I have Win 8.1 box and have DWCS6. Currently I have the default jQ & jQM files. My goal is to update to: A) jquery.mobile-1.4.5.min.css B) jquery.mobile-1.4.5.min.js C) jquery.mobile.theme-1.4.5.min.css D) jquery-1.11.3.min .js I go through
Why does my checkbox's text continue to show when I hide or slideUp the checkbox?
I have created a checkbox in the code-behind like so: Checkbox ckbxSendPDFToThisEmailAddr = new CheckBox(); ckbxSendPDFToThisEmailAddr.Text = "Send PDF to this email address?"; ckbxSendPDFToThisEmailAddr.ID = "ckbxSendPDFToThisEmailAddr"; ...and am endeavoring to conditionally show or hide it in the client/jQuery code based on which of two radio buttons the user selects: $(document).on("click", '[id$=rbPaymentForSelf]', function () { if (this.checked) { . . .
jquery.tipTip displays tooltip text randomly
I am using jquery.tipTip to display text on image’s mouseover but it randomly activates and displays the text when there is no mouseover on the image. $('.tooltip').tipTip({maxWidth: 'auto', edgeOffset: 5, defaultPosition: 'top', keepAlive: false, activation: "hover"});
Using jquery 2.0
If we are using jquery 2.0 then which version of jquery ui needs to use. As tabs function is not working with jquery 2.0.
About Using Bind()
About method Bind() What is the benefit of using bind()? I have two example using binding or another method. Use can use without bind(). Is there a situation that you should use bind() only? https://jsfiddle.net/8he0xmp3/1/ https://jsfiddle.net/4465gLfe/1/ Thanks!
Validate User Password won't work
HELP!!!! I'm trying to show a popup modal box with a password field inside so that the users will type their password, if the password is invalid the page won't refresh and will show an alert that the password is invalid, if its correct it proceed for inserting in database here's screenshot here's my code <div class="modal fade" id="confirm-submit" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog">
Get pixel color from image with JQuery Mobile and IOS
Is it possible to get the RGB value pixel from image on tap ? Is there a complete example of this? I would use jquery mobile to recognize the color where I touch on my IPad. thanks
jquery ajax beforeSend.
Hi, I need your help to display an alert (smartAlert) during php file is calling by ajax beforeSend. This is my code. It works fine but only inside div #risulta. Before that there are some links there are disabled after beforeSend: $.ajax({ type: 'POST', url: "registroQuadri1.php", data: {a:arg1, b:arg2, c:arg3}, beforeSend: function(xhr){ $.alert.open({ type: 'info', title: 'RegistroOnWeb - Caricamento in corso -', content: 'Caricamento del registro personale in corso.
How to changes the color for the node based on Jqtree treeview level
I have created 3 level of jqtree treeview. A -A1 -A11 -A2 -A21 -A3 -A31 I Want to differentiate the node based on level,A should be one color and A1 should be another color and also A11 should be separate color. I have tried in css .jqtree-tree .jqtree-title.jqtree-title-folder { color:green } and also ul.jqtree-tree li.jqtree-folder { Color:Red; } but it show Level 0 and Level 1 node displayed as green color and level 2 node displayed as red.but i want different
Issue with prependTo() and hide()
I have a JS script that will execute an ajax check every X seconds for new content and if any is found, it will prepend it to the top of a timeline. I wanted to get an effect of it sliding down the other content of the timeline, Heres the script thus far: $.get( '/some/url', function ( items ) { // Error: Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'. $( items ).hide().prependTo( ".timeline" ).slideDown(); // This works fine, just
Simple script, but could I have done it better.
I developed a very small script to look through a sharepoint announcement for attachment links, then convert them to thumbnails when the page loads. It all works, but I'm looking for feedback on what could have been done better: HTML (don't have much control over it, sharepoint): <div style="width:100%;display:block;overflow:auto;" class="imthumbs"></div> <div style="padding: 6px 4px;width:100%;" class="imattach"><b>Attachments:</b><br/> <div style="margin-left:12px;margin-top:5px;"> <TABLE border=0
enable and disable items in menu in jquery
Hi in my application there is a menu. following is the menu <div id='jqxMenu'>
<ul>
<li>About Us
<ul>
<li><a href="#">History</a></li>
<li><a href="#">Our Vision</a></li>
</ul>
</li>
<li id="account" >Accounts
<ul>
<li ><a id="cpv">CashPaymentVoucher</a></li>
Code does not work in Chrome or Firefox.. but it works in Safari
Hi, I have a Limesurvey survey where I'm asking respondents to enter the name of the company where they currently work. I also have a list (from previous versions of this survey), with common junk answers for that question. I want to validate the input against that list. If they enter anything from the list, I want to have a warning pop up. The folks at the Limesurvey forum gave me some code to try out. Unfortunately this seems to work only on Safari and IE, but not on Chrome or Firefox. I have had
Loss of collapsible functionality within InfoWindow revisited
I'm using JQM to develop a tide and weather app - (single page - multiple #pageId's) Example view: (http://www.kingfishermobile.rez72.net/index.php) On pages #two and #three, I have select drop-down delivering tide and weather data where collapsible functionality works with a little help from additional code: Example: $( document ).on( 'pageshow', '#three', function() { $('#resultContainerMX').hide(); $('#selectMX').on('change', function() { var location = $('#selectMX option:selected').val();
Filtering the list based on the keyup event in text box
I am trying to create a filtering list(ul li) based on a key up event in the text box. When the user types the li items that containing typed in words needs to be displayed and others needed to be hidden. The problem I am facing with the :contains is that it is case sensitive. Is there any way I can overcome this. I have given my sample html and script. <input class="text-box single-line" data-val="true" data-val-required="The Skill field is required." id="SkillTitle" name="SkillTitle" type="text"
converting xml tree to an html expandable tree using jquery
so thats what im trying to do. its working fine. this is my code: what i want to do i have an image assigned to each type of child, or node. for example i created the class CD so that i can insert in the place of the + the image on the link i put here. as you can see, its working here: https://jsfiddle.net/8qd2xurm/1/ but not when i use it on the web server with the official html and xml files. this is the xml file im using as example: http://www.w3schools.com/xml/cd_catalog.xml any help is appreciated.
Thank you jQuery Mobile developers! and some feedback
I want to say thank you to jQuery Mobile developers because: is the fastest and simple and more developer-friendly way to develop web application i learned it very fast i became able to develop web app alone and very fast i was thinking about suicide with Angular.js each line of code is poetry it works on all platforms and browser not OOP forced My feedback to improve the product: make UI more personalizable (ThemeRoller is not very good, simple customization). To have very good CSS customization
Removing button inside THEAD TH not working in Chrome
Hi, I have this piece of code which works in IE 11 but not in Chrome. Any advise on how to make it cross browser ? $(oTbl).find('thead tr th button').each(function (index, item) { $(item).remove(); });
Jquery Ajax works fine on my localhost but not working on server
Hi, Everybody, I'm done searching and can't find the solution to my problem, Hope, somebody's going to save my life. I've enclosed two ajax requests in jquery onclick event having id (manifest_id), the first ajax request having url (get_manifest_record.php) returns html table and it displays Fine, but the second ajax request having url (populate_field_man.php) is not getting fired, it should populate some of html textbox fields, and the most important thing is that it works fine on my local machine
How to periodically check if I have a link on the html page or not?
I have a DIV in my html page. and within the DIV I have a link that shows up when I am online. Any way to hide and show the DIV depending on if anyone is online or not? like only show DIV when online link is active? How can I periodically poll using an AJAX call or Jquery every n minutes or seconds to check if someone was online and update the CSS class accordingly based on if the function returned true or not and make DIV visible accordingly?
How to make infinite scroll smoother
I have a timeline on my application that will load more items via AJAX as you scroll closer to the bottom, it works great, I just think that the scrolling is a little jerky, it seems to jump around when it loads the item. The scroll will jump to the half of the scroll bar then back down to the bottom. Does anyone have any idea how to make that a bit smoother? Code: var scroll_threshold = 25; var total_items = 123; var loading = false; var $items_loading = $('#loading-items'); var $timeline_id =
select Option based on value
Hi, I would like to select the value of select option dynamically using jquery. I am calling service to get country name, based on country name, i need to set that country as selected. I will get country in full name from service( like "Canada") and not in two letters. <select> <option value="US" text="United states" /> <option value="CA" text="Canada"/> <option value="Mx" text="Mexico" /> </select> Could anyone help me on this?
Dynamic id/class values
Hello, How can I copy the classes of the first list (#first-list) and add them to list items of another list (second list) dynamicaly? Any idea? <ul id="first-list"> <li class="item-1">item 1</li> <li class="item-2">item 2</li> <li class="item-3">item 3</li> </ul> <ul id="second-list"> <li>item 1</li> <li>item 2</li> <li>item 3</li> </ul> Thanks in advance Dimitris
using .html() with .text()
To solve a problem with double quotes breaking my code in a text area, I found a solution online to convert the double quote character to an html entity (") before storing it in the database. The solution then instructed to use $(#comments).html(data.comments).text() to display the text and have the " display as a double quote. This all works. My actual question is what is the .text() doing at the end of the statement, or is it not needed? Thanks
Next Page