Jquery

Ruby on Rails updating list with AJAX breaks order

I have a list of elements in a certain order. The problem is when I update any element with AJAX this element jumps on the bottom of the list. When I reload page it returns on the right place though. I’d prefer this element to stay in the place when updating. The list: <div class=”shopping-cart”> <%= render “shopping_cart” %> </div>…
Read more

YouTube IFrame player blocks mouse events bound over its parent container

I am trying to load YouTube player using IFrame api. DOM Structure <div id=”player-wrapper”> <div id=”player”> </div> </div> Jquery code to load player $(document).ready(function () { $(‘head’).append($(‘<script src=”https://www.youtube.com/iframe_api”></script>’)); }); window.onYouTubeIframeAPIReady = function() { Player = new YT.Player(‘player’, { videoId: ‘RVRlV53TjzY’, playerVars : { theme : ‘light’, color : ‘red’, iv_load_policy : 3, modestbranding: 1, disablekb: 1, showinfo: 0, controls: 0,…
Read more

MutationObsrver not able to recognise changes

I have written small JSFiddle to identify the changes in the paragraph.But I don’t why the changes are not identified by MutationObserver? I am quite new to it,what I want is alert should be displayed when there are some changes made to Text. JSFiddle link : http://jsfiddle.net/AbhiAshD/9cu46ha3/ Thanks, Abhishek Source: jquery

How to resize the jQuery grid when browser window is resized?

I created the jQuery grid and I want it’s width to resize when the browser window gets resize. Here is my code: $(“#list4”).jqGrid({ datatype: “jsonstring”, height: 150, colName: myColName, colModel: myColModel, width: $(window).width()-50, scroll: 1, shrinkToFit:false, viewrecords: true, rowNum:10, rowList: [10,20,30], caption: “Standard Fields”, editUrl: ‘clientArray’, onSelectRow: function(id) { if (lastsel != ‘undefined’) { $(‘#list4’).jqGrid(‘saveRow’, lastsel, true, ‘clientArray’); } if…
Read more

Replace value of text box if value matches with master then to yes else to no

The below code add a css class if the value of inputs are same but i have a condition where i want to Compare a specific class “User” text box with master if both’s value matches then then make that text box value as yes if Dis matches then make that text box value to no. HTML: <input class=”user” value=”1″>…
Read more

Append Answer (li tag) to respective Questio (ul tag)

I am trying to make a dynamic Question & Answer form. Basically I have inputs that are generated like so <input id=”Question-1″ class=”question”></input> <input id=”Q1-Answer-1″ class=”answer”></input> <input id=”Q1-Answer-2″ class=”answer”></input> <input id=”Question-2″ class=”question”></input> <input id=”Q2-Answer-1″ class=”answer”></input> <input id=”Q2-Answer-2″ class=”answer”></input> The user can add or remove questions, answers as much as they desire. Now, when a function is called, all the question’s…
Read more

CSS3 Animation Menus Current page

I am using the menu from example10 css from the webpage http://tympanus.net/Tutorials/CreativeCSS3AnimationMenus/index10.html how can i modify it so that the menu item for the current page will be a different color from the others? the code for the css as it is now is: @font-face { font-family: ‘WebSymbolsRegular’; src: url(‘websymbols/websymbols-regular-webfont.eot’); src: url(‘websymbols/websymbols-regular-webfont.eot?#iefix’) format(’embedded-opentype’), url(‘websymbols/websymbols-regular-webfont.woff’) format(‘woff’), url(‘websymbols/websymbols-regular-webfont.ttf’) format(‘truetype’), url(‘websymbols/websymbols-regular-webfont.svg#WebSymbolsRegular’) format(‘svg’); font-weight:…
Read more

Linkedin Share button doesn’t work in Internet Explorer

I would like to share a content from my own website (ASP.net) on Linkedin. I implemented the Sharing button but it doesn’t work in Internet Explorer whereas it works on Google Chrome and Firefox (probably on Safari but i didn’t test). Actually, my website must be compatible with Google Chrome, Firefox and Internet Explorer (version 10 and 11). So this…
Read more

Remove triple scrollbars from jQuery UI Dialog

So I have a jQuery dialog box that uses hrefs to dynamically open new dialog boxes depending on each tables ID. Please see screenshot of how it looks: http://imgur.com/JzIB09a I have no idea why it looks this way or how to remove the scroll bars. My jQuery Dialog Code: $(document).ready(function () { $(‘a#pop’).live(‘click’, function (e) { e.preventDefault(); var page =…
Read more