jQuery HTML parser corrupts script content that looks like HTML tags
Hi, my plugin below is suffering from the following known issue in jQuery: jQuery HTML parser corrupts script content that looks like HTML tags My first question is: Has there been a fix in the meantime? Thanks in advance! jQuery Ajaxify Plugin: https://4nf.org/
Những ưu điểm vượt trội của truyền hình FPT
Những ưu điểm vượt trội của truyền hình FPT Chương trình truyền hình internet FPT hiện nay đã phổ biến khắp mọi nơi và nhiều người đã biết đến vai trò vô cùng quan trọng của nó. Chương trình truyền hình FPT sẽ giúp bạn mang đến cho người dùng một hệ thống thông tin, dịch vụ giải trí rất đa dạng và phong phú. Đây là sản phẩm tích hợp được giữa truyền hình với công nghệ giải trí hiện đại, thông minh nhất giúp người dùng thoải mái giải trí cùng gia đình và bạn bè. Ngoài ra, bạn cũng có thể lựa chọn
Problem since updating to iOS11
Hi I've been a gallery script on my website to create a touch swipe gallery and everything has worked ok until the iOS 11 update. I am now finding I have images opening at different sizes and not scaling as before. everything worked ok on earlier iOS versions. Any ideas on what might be causing this? Thanks
Can't target thumbnails
Here is my site: http://yardenharel.triplebit.com/product/%D7%97%D7%95%D7%9C%D7%A6%D7%94-8/ I need to alert when any of the thumbnails gallery images(right to the main image) is clicked like so: $('ul.slides li').each(function() { $(this).on("click", function(){ alert('thumbnail clicked'); }); But this doesn't happen.. Can someone advise please? Thx
Target Element After Added to DOM Inside Window Resize
I can't seem to target an element created by ajax and then added to the DOM. The targeting is done when a window resize is done. My code: $(window).resize(function() { var mythis = $('#wrapperdiv #newdiv'); console.log('Mythis: ' , mythis); // Returns - n [] ie. not in dom }); Is there an easy way to target mythis ?
attr | value
trying to understand the following var val = $(this).attr('colspan') | x) if there is no col span and x is 5 then val will be 5? if there is a colspan of say 2 and x is 5 then val will be 7? Is there a way to say val = colspan if colspan exists else val = x? not add them together if both exist?
About Ajax and function closure problem
Hi: I have a problem about the ajax and function closure. The following is my code snippets. var Handler = function (size, cur) { return $.ajax({ type: 'POST', dataType: "json", //for post method url: './Demo.aspx/Demo', contentType: 'application/json; charset=utf-8', data: JSON.stringify({ p1: size, p2: cur }), error: function (error)
I am getting a odd bug and I wanted to see if jQuery can solve it for me
In summery. When you play a video and go to the next page then push back the audio from the video is still playing. Can jQuery refresh this or suppress it somehow without breaking anything else =D. https://bydesigndental.com/ Here is how to recreate the issue: Follow these steps to recreate the problem: 1) On the home page, click Watch the Video. Let it play a few seconds. 2) Close the video (click the X in the top right corner). 3) Navigate to another page -- any page is fine. 4) Click the
Searching element BEFORE another element
Assume I have the following code <div class="top"> <div>.aaa...</div> <div class="foobar">.bbb..</div> <div>.ccc..</div> </div> How can I address with jQuery the <div> element BEFORE the <div> element with class="foobar"? With pure CSS this isn't possible AFAIK. But in Javascript it should be possible by a function like previousElementSibling(). Maybe there is a shorter, better way in jQuery? Peter
ASP.NET page with update panel, fade a div
For the life of me I can't get this to work. I have a form with a textbox, which has autopostback. When the postback occurs I want the div to fade. (eventually I want it to fade in, pause and then fade out, but for now lets just get the fade out working) My script (put in document.ready so it will work with partial postback): $(document).ready(function () { function FadeMessage() { $('#MessageContainer').fadeOut("slow"); }; }); The div: <div class="message"
Set value in nested div
Hi All, Below is criteria of nested div. Using jquery code I need to replace highlighted "JOSEPH MARY JACINTHA" with "Test" Any help will be highly appreciable Regards
$ undefined Microsoft Edge
Hallo, our service have some problems with Edge browser 14.14393.0 returning error '$' is undefined This has been report only on Microsoft Edge in last 2 months. Any ideas? does anyone had this issue? Are there any unsupported futures ?
Internet explorer issue with slideUp / slideDown
Does internet explorer version running in few windows based mobile supports SlideUp or SlideDown jQuery features? Help needed please.
best way to loop through specific table cells in row
I have a scenario where I want to loop through a specific set of cells based on a start and end column or row index. Is it better to use a while loop and do a find each time inside the loop? I can't use .slice because if another cell has a colspan it can throw out the column index.
How to call javascript original function while using selector
Hi: I meet a problem when using selector. The code snippet is as following: var nodeID = document.getElementById(nodeid); if (nodeID != null) { var handling = $("#" + nodeid); handling .empty(); nodeID.parentElement.removeChild(nodeID); } I hope I can use handling.parentElement.removeChild(nodeID); but it in fact not working and return error. is there any way to call javascript prototype function when using selector, thanks a lot.
Nested table.
Hi, I need your help to complete a function where there is a nested table. When I click on element it opens the second table and it shows all his elements and the fa-plus icon turns on fa-minus. I would like to close the elements of the first table when I click on it and the fa-icon fa-minus turns on fa-plus. I prepared a fiddle: http://jsfiddle.net/t763P/1141/ Thanks in advance Tegatti
Two scripts conflicting?
I have two scripts that work fine by themselves. If I try to use both scripts together the first one doesn't work, but the second one does. The first script is to control the playbackRate of myaudio element. The second script is for a vu or volume meter. This is both scripts in the order I'm using them: // Create a couple of global variables to use. var audioElement = document.getElementById("myaudio"); // Audio element var ratedisplay = document.getElementById("rate"); // Rate display
creating a popup or tooltip on a mouse enter
I have this function that came with a responsive image map program - I'm not at all proficient with jQuery, but learn as I pick it apart. I would like to run either a popup or a tooltip with a close button instead of an alert, and using mouse enter, (I guess?) so that it won't go away unless the close button is clicked. $('area#eastWin').on('mouseover', function() { alert($(this).attr('alt') + ' clicked'); }); Can some kind soul help me with this? Forever grateful, GN
JSON stringify vs object
Hi, I have a row set like this and added to the DOM var htmlRow = "<div id='GridRow_" + rowIndex + "' class='GridRow' data-player='" + JSON.stringify(player) + "'>\n</div>"; I get the row using JQuery 3.3.7 like this var row = $(this).closest('.GridRow'); var player = $(row).data('player'); This gives me the player as an object. PERFECT ! Now I take this same player modified and attach it again using JQuery this time like this : $(row).data('player', "'" + JSON.stringify(player) + "'"); Which looks
each on array of two objects results in three objects
I'm trying to iterate through an array and clone and append an element to a div element for each item in the array. Everything is working except that when it's more than one element I get som unexpected results. The array contains two element's and I've checked that the each loop only runs two times, but for some reason I get a third element in the result (as you can see from the image). The two first are correct, but why am I getting a third element? Am I using clone() and append() correctly? each:
Multi dropdowns populated from api's
Hi, I have a basic form that has a dropdown which is populated from an api with the following function <!-- get categories --> <script> var sel = $('#Categories'); var api_url = 'https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx; jQuery.get(api_url, function (data) { $(data).each(function (key, val) { console.log(key); sel.append($("<option>").attr('value', val[1]).text(val[1])); }); }, 'json'); The form
Convert from stringify to boolean
Hi, I am using below: Savanna.savanna_admin = JSON.stringify(data[0].savanna_admin); to get the bit value from MySQL and it returns: "\"1\"" How can I make this converted to true and when it's "\"0\"" then to be as false? Thanks, Jassim
always return first row hiden field value problem
Hi, I have a rendered bootstrap html page as follows. i want to get the clicked row hidenfield values but now always return sumesh which is first row. How can i get clicked row hidenfield value? <div class="panel-body"> <div class="page-header"> <h4><span class="glyphicon glyphicon-user color"></span> Sumesh</h4> <input type="hidden" id="hdnTenantName" name="hdnTenantName" value="Sumesh" /> </div> <div class="page-header">
About the usage of jQuery bind function
I have a problem about the usage of bind function. Here is the example: // Parent class function Widget(width, height) { this.width = width || 50; this.height = height || 50; this.$elem = null; } Widget.prototype.render = function($where) { if (this.$elem) { this.$elem.css({ width: this.width + "px", height: this.height + "px" }).appendTo($where); } }; // Child class function Button(width, height, label) { // "super" constructor call Widget.call(this, width, height);
detach and append resizing issue
I have the following scenario: <div> ... <div id="div1" style="width:50%;overflow:auto"> <div id="div2" style="width:100%;overflow:auto"> ... </div> <div> ... </div> I want to detach div2 from div1, create div3, append div2 to div3, and then append div3 to div 1, as follows: <div> ... <div id="div1" style="width:50%;overflow:auto"> <div id="div3" style="width:100%;overflow:auto;padding:10px"> <div id="div2" style="width:100%;overflow:auto"> ... </div>
Referencing all ::before elements?
In the past I already asked on how to peek into a ::before CSS rules e.g. for example in <div> <soan> ::before </span> ... </div> with a CSS deklaration like span::before { content: "foobar"; } I learned that this is not possible resp. only with difficulties. Ok, now a simplified scenario: I don't want to peek into or modify such rules but find simply all <span> elements which have such a ::before clause. Afterwards I want to remove these elements. Therefore the following does not work $("div span::before").remove();
Slide Down/Toggle Div
Hi, We have package boxes on our page and was wondering how to target and slidedown/toggle the ".p-more-info" on each div on button (".showmore") click? Any insights will be helpful. <div class="package-box"> <div class="package-wrap"> <h1>Package 1</h1> <div class="p-more-info" style="display: none"> <p class="p-features">FEATURES</p> Lorem ipsum dolor sit amet <a href="#" class="btn btn-orange">GET THIS PACKAGE</a> </div> </div>
Find the correct video selector
I have a client in the following URL http://rmfmm.com In the homepage center there is a video with a poster image. I want to define a jquery click event upon start playing by clicking on the video box but I can't set the right selector(like $("#video").click(...) Can someone help please? Thx
Merging Unmergin Table Cells
Hi Guys, Here is the issue I'm currently having. I have a HTML table with five columns and 50 rows. some of the cells in the columns have repeated text that I would like to have the option to merge or unmerge. Here is my merge function function mergeGridCells() { var dimension_col = null; dimension_col = 1; // first_instance holds the first instance of identical td var first_instance = null; var rowspan=1; var columnCount = $("#mainTable tr:first th").length; for (dimension_col = 1; dimension_col
Add button link after each excerpt
Hello, I need to add a button link to post after each excerpt, this is the html example: <div class="post-content"> <h2><a href="https://link1">link text1</a></h2> <div class="excerpt"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer faucibus risus vel risus aliquet commodo. Nullam luctus blandit erat, non pellentesque felis tincidunt eget. [...]</p></div> </div> <div class="post-content"> <h2><a href="https://link2">link text2</a></h2> <div class="excerpt"><p>Lorem
Trying to extract an element attribute value that is part of an object
I have an input field coded as the following: <input type="radio" name="03794" class=" js-sourcing-option" data-sourcingoption="{"hasBackOrder":true,"isPartial":false,"unsourcedQty":0,"warehouseSequences":[1],"shipments":{"2017-10-12T17:00:00":{"warehouseNumber":101,"deliverByTime":"2017-10-12T17:00:00","numShipments":0,"warehouseQty":0,"backorderQty":1,"qtyByWarehouseInStock":{},"qtyByWarehouseBackorder":{"101":1}}},"sourcedQty":1,"shouldDisplay":true}"> Using jQuery, I cannot figure out how to
Add empty cell to HTML table when column missing from XML
I have a XML file and I'm populating a HTML table with the data in the XML using jQuery. The XML file has the following format: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Row> <Patologia>Alzheimer</Patologia> <Molecula>Galantamina</Molecula> <Nombre_Comercial>RAZADYNE®</Nombre_Comercial> <Fecha_Exp>2017-06</Fecha_Exp> <Propietario>JANSSEN PHARMS</Propietario> </Row> <Row> <Patologia>Alzheimer</Patologia>
How to Hide a tr after checking two condition
Below is my html code and I have to hide this row after meting below condition using jquery Condition h3 tag should containing 'lblInformation9' and td contains text "Broadcast Tech" HTML <tr><td width="190px" valign="top" class="ms-formlabel"><h3 class="ms-standardheader"><nobr>lblInformation9</nobr></h3></td><td width="400px" valign="top" class="ms-formbody lblInfo" colspan="2">Broadcast Tech</td></tr>
Creating a Theader
Hello, I'm creating a table dynamically from a xml using the following code function showData() { $.ajax({ type:"GET", url:"test1.xml", dataType:"xml", success: function(xml){ var fila = $(xml).find("Row"); var tabla = $("<table />"); tabla[0].border = "1"; var row = $(tabla[0].insertRow(-1)); fila.eq(0).children().each(function() { var headerCell = $("<th />"); headerCell.html(this.nodeName); row.append(headerCell); }); $(fila).each(function() { row = $(tabla[0].insertRow(-1)); $(this).children().each(function()
best way to encrypt or hide jQuery code
Hi, What's the best way or tool to hide jQuery code from the browser so when I deploy my application on host others won't be able to see the code? Kindly advise... Thanks, Jassim
Set accordion contents heights
Hi, Could you please guide how to setup accordion controls height. I am frustrated with autoheight property. please see code below. thanks <script type="text/javascript"> $(function () { $("#accordion").accordion({ collapsible: true, autoHeight: false, active: false }); }); </script>
about choosing a technology
I have completely developed my website with jquery and we decided to choose angular for business logic but there was confict angular over jquery ,so we have stucked. whether moving to jquery to write business logic is advisable?
Changing background on different parts of 3 x 3 grid
I have a 3 x 3 grid - each part of the grid has a different background image. I would like to change 1 section of the grid background after say 5 seconds - fade in a new background. Three seconds later I would like a different random part of the grid to change its background. The following html, css and jQuery changes the background image on each container but to the same background - not what I'm trying to achieve - any help would be greatly appreciated. Here is the html: <body> <div class="grid">
Ajax, script, and 404: behavior changed after jquery upgrade
Hello, I am trying to upgrade my app from JQuery 2.2.4 to 3.2.1, and I get an error that I did not have before. I pared it down to the following simple example: <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $.ajax({ url: 'doesnotexist.js', async: false, dataType: 'script', timeout: 500 }); </script> </head> <body></body> </html>In the Firefox console, I can see the 404-error on the GET request
How do I add an if else statement to this?
How do i add an if else statement to this: $(function(next) { // Setup the player to autoplay the next track var a = audiojs.createAll({ trackEnded: function() { var next = $('ol li.playing').next(); if (!next.length) next = $('ol li'); next.addClass('playing').attr('id', 'playing').siblings().removeClass('playing').removeAttr('id'); var container = $('#rightbox'), scrollTo = $('#playing'); container.animate({scrollTop: scrollTo.offset().top
Next Page