jquery

Draw scaled rectangles on scaled image canvas

ε祈祈猫儿з 提交于 2021-02-11 18:15:58
问题 I'm working on a project in which i need to draw an image on a canvas and rectangles also to mention the objects present on that image. Rectangles are drawing correct positions if the image is not scaling to fit to the canvas. But if i scaled the image, Rectangles are not getting scaled to meet the correct positions. I have already gone through similar questions/answers present on stackoverflow, but none of them are working in my case or may be i'm not much educated to understand and

Populate Select box from XML with jQuery - Cascading Select boxes

谁说胖子不能爱 提交于 2021-02-11 18:14:36
问题 I'm having a little trouble in getting this one figured out. I need to have two SELECT boxes, in which the first select box determines the content of the 2nd one, and if one of the selects in the 2nd one is chosen, will open a link in a new window (or new tab): My XML is as follows: <?xml version="1.0" encoding="utf-8"?> <countries> <country label="Australia"> <store link="http://Link1a.com">Retailer 1a</store> <store link="http://Link1b.com">Retailer 1b</store> <store link="http://Link1c.com

JQM specifying swipe page change

泄露秘密 提交于 2021-02-11 17:59:30
问题 Trying to make a mobile webapp. Three of the pages namely article1,2,3 should transition from one another on swipe. Within each article page there should be links to other page that show up with a flip transition. I have managed to sort of make it work however the code I am using is causing the app to be able to swipe through all of my 'pages' while I wish to target only the 'article' pages for the swipe feature. I think mainly the JQ needs to be changed to go directly to specific pages, is

how to add click event on dynamically generate element jquery

浪尽此生 提交于 2021-02-11 17:58:16
问题 I was try to add click event on dynamical ID's on a table row. I have set row ID to each row of a table. Now I want to add click event to show a row (class="hidden")slidedown in toggle. Actually the table row will print through a loop using classic asp code. <table id="bus-list" class="table table-bordered table-result"> <thead style="background-color: #FCA04E"> <tr> <th>Bus Operator</th> <th>Bus Type</th> <th>Depart</th> <th>Arrive</th> <th>Duration</th> <th>#</th> </tr> </thead> <tbody> <tr

jQuery DataTable add dynamic columns

南楼画角 提交于 2021-02-11 17:57:25
问题 I have a JSON object like below (dataSource) in that JSON object the property 'viewClasses' sometimes comes as blank, here what I want to do is if 'viewClasses' have any record I want to add a dynamic column to the table and the name of the column header will be the value of 'viewClasses.class', I have tried the below code but it's not working as expected. Here is the result of the below code - Here how I want this to be- var dataSource = [{ "Name": "PI61890", "portfolioName": "PGIM Emerging

jQuery DataTable add dynamic columns

余生长醉 提交于 2021-02-11 17:57:21
问题 I have a JSON object like below (dataSource) in that JSON object the property 'viewClasses' sometimes comes as blank, here what I want to do is if 'viewClasses' have any record I want to add a dynamic column to the table and the name of the column header will be the value of 'viewClasses.class', I have tried the below code but it's not working as expected. Here is the result of the below code - Here how I want this to be- var dataSource = [{ "Name": "PI61890", "portfolioName": "PGIM Emerging

How can I clone a table row using jQuery?

。_饼干妹妹 提交于 2021-02-11 17:55:38
问题 I want to clone my tr class row. So when the user is clicking at a button, the row will clone and will set below the last row. I currently use the following code, only it will not work properly. I probably not be correct. JS: var row = jQuery('.ui-sortable').closest('.ui-sortable').find('tbody tr.row.ui-sortable:last-child'); var clone = row.clone(); The cloned field looks like this: HTML markup: echo '<tbody class="ui-sortable">'; echo '<tr class="row">'; echo '<td class="order">1</td>'; //

$(window).on('popstate') is not working in IE

女生的网名这么多〃 提交于 2021-02-11 17:50:43
问题 $window 'popstate' event is not working in IE on browser back button. Below is the code snippet which is getting used to remove some modal classes on back button. $(window).on('popstate', function(event) { event.preventDefault(); event.stopPropagation(); $('.modal-backdrop').remove(); $('body').removeClass( 'modal-open' ); }); Issue - when Modal is open and on click of browser back button trying to remove modal classes on previous page which is coming after click of browser back button. In

onmouseover and onmouseleave triggering randomnly on image map

孤街浪徒 提交于 2021-02-11 17:49:24
问题 I'm having an issue with onmouseover and onmouseleave event. This code only works maybe 5% of the time and I don't understand why. Just looking at the console when I hover over the image map. It triggers the onmouseover then the onmouseleave and then onmouseover again. If I comment out the bootstrap modal show and hide then the image just swaps and triggers events normally. I don't know if this is an issue with bootstrap modals or what but I have two call to action buttons on the same page

flot chart extend lines to end of chart

自古美人都是妖i 提交于 2021-02-11 17:47:42
问题 I have been trying to extend the "LineChart" in the chart to beginning and the end of the canvas. But i am having no luck with it The options for Flot Charts are . ///initialize default chart options chartCtx.options = { grid: { hoverable: true, clickable: true, tickColor: "#d5d5d5", borderWidth: 0, color: '#d5d5d5' }, colors: ["#1ab394", "#464f88"], tooltip: true, xaxis: { mode: "time", timezone: "browser", tickSize: [5, 'minute'], tickLength: 0, axisLabel: "Minutes", axisLabelUseCanvas: