Help needed: how to keep drop down menu showing on hover and close only on click
Hi everyone, I looked everywhere, couldn't find the solution. I have a navigation menu with dropdowns, I need the dropdown to be open on hover/mouseenter always, even the user change tabs or navigate inside dropdown menu. And close only on 'X' close button. The sample code: $('.main-nav ul > li').mouseenter(function(e){ $(this).addClass('active').find('.dropdown-menu').show(); }).mouseleave(function(e){ $(this).removeClass('active').find('.dropdown-menu').hide();
Do some when DIV content changes
Trying to do something when the content of a DIV changes and the new content is an "O" but it does not seem to work for me. My code looks like below. Any Ideas on how I can solve this problem. jQuery('.select2-chosen').bind('DOMSubtreeModified',function(event) { var newText = $(this).text(); alert(newText); if ($('.select2-chosen:contains("O")').length === 1) { alert(newText); } }); It is the minum height inches field on this page
selector problem?
I don't see the problem with this selector: var selectedid = $("[id^=cccproj][data-selected=='1']").prop("id"); // check id starting with cccproj that has data-selected value of 1 Does it look good to you?
Get Positions Of Elements Which have No Styles Assigned
I was able to get the XY coordinates of all the child elements of a div and they all have the same top and left values. Why are the top properties (Y values) of all the child elements the same, shouldn't they be different since each element starts on a new line? Please click here click any where in the gray box. You will see that the top left coordinates for all child elements of main are all the same.
Jquery date-picker "fromdate" reflect to "todate"
I try jquery datepicker In this i set some some conditions 1) from date show only 2 year i.e. if 2016 then previous month must be 2015 if 2017 then previous month will be 2016 2) second is suppose i select date aug 1, 2016 from date then user select two months i.e. if aug 1, 2016 then sep 30, 2016 same as if user select feb 15, 2016 then april 15,2016 i.e. only two month 3) if current date is 5 October 2016 then onwards date of oct and months i.e. nov , dec must be hide and i am done with
Small content window on google map
i try to plotting data on google map and i am done with this now the problem is there is 4000+ records in table so plotting this data on map takes too much load time and sometimes code is break so how i solve this .. this is what i try var map; debugger; var latlng = new google.maps.LatLng(74.0895898, 97.0998546); debugger; var myOptions = { zoom: 8, center:
Load PHP in HTML Pages
Hi there, I have a question. is there a way I can load a PHP based webpage on a simple HTML page without using iframes? For example if I have a DIV container. Can I show a php based webpage inside that Div Block?
Zero Progress Bar
I want to set the data-max of my progress bar to zero but doing this causes the progress bar to count 'til infinity (100 divided by zero). How can I set my progress bar to zero? Here is my HTML: <progress class="progressbar" value="0" max="100" data-max="1"></progress> I link to jquery and modernizr. Here is my javascript: $(document).ready(function() { $('.progressbar').each(function() { var progressbar = $(this), progressbarValue = progressbar.next(), value
scrollTop moody - again
Hello all, here's an extensive description of the bug. (Please excuse me linking to content, but the description is just too lengthy) Bounty of €100 applies! Edit: Just found this - I suspect something similar... (i.e a timing problem) This seems similar, too. Thanks in advance
VBScript value into generated html
HTML <span id="ShowCount" name="ShowCount"></span> jQuery Ready function $("#ShowCount").html("ABC"); The above works just fine but how to I substitute for the "ABC" with the value of a known VBscript variable called mycnt? $("#ShowCount").html($("mycnt").val); Doesn't seem to work. Thanks
And code still works, where jquery-migrate-1.2.1.min.js needed???
I replaced this <script src="js/jquery-1.11.3.min.js"></script> <script src="js/jquery-migrate-1.2.1.min.js"></script> with <script src="https://code.jquery.com/jquery-1.12.4.js"></script> And code still works, where jquery-migrate-1.2.1.min.js needed???
Hide div on click
In this image when i select value from dropdown and select dates then container is displayed and then when i select row from table data then cont and sumdata div is displayed now i want when i select again dates from datepicker then want to hide all divs ... and when click on search then want to display container code <script type="text/javascript"> var strarr = "[{name:'sfdsdfLi', y:9}, {name:'Kiwsdfi', y:3}, {name:'Mixesdfdnuts', y:1} ,{name:'Oranges', y:6}, {name:'Grapes', y:1}]"; $(function
jquery ile index değeri almak
. Indeks var a = $ ( "[ '+ Sıra +" # PersonelHesapListe li a = veri kimliği "']") () $ ( '# PersonelListe Li') [a] .focus (); $ ( '# PersonelListe Li') [a] .click (); bu kod çalışmıyor. istediğim şey veri id yapmak Si parametreye uyan Liste öğesini seçmek sizce bunu nasıl yapabilirim.
click on datepicker highcharts
this is jsfiddle which i try not getting chart on second time http://jsfiddle.net/t13jymwk/87/
scrollX position function only works when I refresh the page
https://jsfiddle.net/martaklopf/Ltgj2kt0/2/ Hi! I have been struggling with the code I posted. What I am trying to do is change the background color and text based on the horizontal scrolling position, which is working on refresh. If I refresh the page when my scrollX is <421 than the background changes to blue and some text gets changed, and if I refresh when it is >421 the background changes to red. However, I would like this to work without refreshing (=as I am scrolling, once I pass 421 the background
Dynamic Additions of DOM Elements, using JavaScript
I am trying to add an anchor element, dynamically, to a webpage that I am making, and I want to do so, using JavaScript — no JQuery at all. The associated code that I used in my attempt to add the aforementioned element was: var test= document.createElement("a"); test.href="#"; test.appendChild("link"); I tested the above code in IE11, and it "threw" me an error: HierarchyRequestError. How can I fix this issue?
Script for populating html elements with content from a .json file not working on mobile
On THIS page I have a bunch of "placeholders" for phone numbers in the form: 07xxxxxxxx. Upon clicking the green button "VEZI TELEFON", the placeholder in each green box is replaced with a real phone number from a JSON file, via $.ajax. The console strangely shows 2 different things on desktop and mobile. The value of index is different it seams... Desktop: 0: 0743127315
1: 072245875
3: 0756129668
4: 0724153333
Uncaught TypeError: Cannot read property 'tel' of undefined
Mobile:
1: 072245875
2: 0756129458
4:
Add a column to an existing table (as first column)
I know how to add a new column in an existing table but it ends up as the last column. I need to add the column so it ends up being the first column. How can this be done?
How to cut a certain element and paste it at another place on a webpage?
Assume I have a webpage with the following structure: <div class="foobar"> .... <div class="blahblah"> ..... </div> sometext ....someotherelemens ... paste cut element here </div> Now I want to cut the element with the class="blahblah" (including its inner content) from its original place and paste it just before the closing </div> for the element <div class="foobar"> How can I do this with jQuery? If necessary the operation can be split into two jQuery statements. However a one-liner is preferred.
jquery load and the http 302 status redirect
I am trying to load some external html from a webpage that uses CAS Single sign on . the page i am loading it from is allready authenticated so the SSO method will redirect me to the CAS page <script> $(document).ready(function() { $('#content').load('https://uviewaccp.usask.ca/SASWebReportStudio/logonAndRender.do?&_sasapp=SAS+Web+Report+Studio&rsRID=SBIP%3A%2F%2FMETASERVER%2FAdmin+Unit%2FHR-AVPO%2FReports%2FADHA-1090+HR+Total+Rewards.srx(Report)&rsAM=pUrl #otvc100056_ComponentContainer'); });
What does this mysterious selector do?
What's the difference between $.fn.insertAtCaret = function (myValue) // i saw this in an example, but don't know what it means and function insertAtCaret (myValue) // this doesn't work in his example but is similar to how I name functions I checked the jquery documentation for selectors but his selector isn't covered, so I don't know how he came up with it. It seems somewhat similar to jQuery.fn.extend() but he's not using .extend
how save hidden courses in variable removeid
I need when click on remove button hidden the courses removed then save in variable name removeid removeid will have courses be hidden when remove as example below my code as following in fiddle https://jsfiddle.net/0xfvzqxa/ suppose i have courses Id CourseName 1 c# removebutton 2 asp.net removebutton 3 javascript removebutton suppose i remove 2,3 that represent asp.net and javascript then removeid variable will have value 2,3 after click remove courses and be hidden
JPlayer playlist - need to move variable values from head to body
Hello Please check the code below defined in the head tag. I now need to move the myPlaylist.setPlaylist variable and from the head html tag into the body html tag., so I can change the playlist dynamically. Can you please advise? Why? - I'm using a DNN module and injecting dynamic data. Unfortunately I can only inject data via tokens into the body and not the head. Many Thanks... <link type="text/css" href="/script/jplayer/skin/pink.flag/css/jplayer.pink.flag.css" rel="stylesheet" /> <script type="text/javascript"
Markercluster, google maps cant get location object
I want to make a markercluster, where i get my lat/lng values from my database. When i use this example here: https://developers.google.com/maps/articles/toomanymarkers Then those location values are objects and those are working. Now I have a loop where i create an array: lnglatarr.push({ lat: parseFloat(i[l].getAttribute("lat")), lng: parseFloat(i[l].getAttribute("lng")) }); // AFTER THAT i send the array to this function: createcustom (lnglatarr); Here the function function createcustom(arr)
google maps markerclusterer not working
Hello, i asked this already, but its not placed in this forum. Well, to make is very short. If i use this list of geolocations and place is hardcoded, it works: var locations = [ {lat: -31.563910, lng: 147.154312}, {lat: -33.718234, lng: 150.363181}, {lat: -33.727111, lng: 150.371124}, {lat: -33.848588, lng: 151.209834}, {lat: -33.851702, lng: 151.216968}, {lat: -34.671264, lng: 150.863657}, {lat: -35.304724, lng: 148.662905},
JQ GRID PAGING TO SERVER SIDE.
Hi friends, I am using below code to load jq grid. How can I achieve pagging to server side. Below is my code. </script> <script type="text/javascript"> var firstClick = true; // << Outside the click handler $(document).ready(function () { $('#Button1').click(function () { jQuery('#dataGrid').jqGrid('clearGridData'); $("#dataGrid").jqGrid("setGridParam", { postData: { mfrmdt: document.getElementById('txtDateFrom').value, mTodt: document.getElementById('txtDateTo').value, mitem: document.getElementById('ddlItemCode').value,
Hide an element with jQuery/javascript when the user is logged in
Hi All, I would like to hide a menu item when the user is logged in already, here is my code but it doesn`t work properly: I am checking if the user is logged in - (the top line works as it displays the alert message if I add one), but for some reason it doesn`t hide the menu item and the megamenu looks messed up when the user is logged in. What would be the correct way to hide it? Thank you function hideing() { if ($('#dnn_dnnUser_enhancedRegisterLink:contains("SuperUser Account")').length > 0)
How to set a default value with $(selector).val()
Hey, is there any way to set the default value returned by $(selector).val() while the object (text, textarea...) has no value? What I mean is the way something like below: $(selector).val().setDefault('myDefaultValue'); Right now the only way is doing some little overcode like: var value = ''; value = $(selector).val(); if (!value) { value = 'myDefaultValue' } Cheers Andrzej
Droppable to specific locations
I'm trying to convert my Adobe Flash game into HTML, but not having luck. Can anyone steer me in the direction of a script for droppable boxes into specific targets? It's a lowercase to uppercase matching game so the box with "a" can only be dropped on "A". I can get all the little parts going, but any box can be dropped anywhere now.
Dynamically loaded page
I have a page index.php where I have jquery being used. One of the uses is to call another page. When that page is called and loaded I want to use jquery from index.php? Maybe even do a ready event. How can I do this from my ajax loaded page?
wat is this??
how to use query sting
Populate span tag(s) with data from a json file
On THIS page, I have listed some dummy estates and hard-coded, for each one, a span (with the text "VEZI TELEFON") that when clicked, reveals a phone number. I want every phone number to be retrieved from a JSON (or PHP) file called telefoane.json that has the content: {
"telefoane":[{
"id":"1",
"tel":"0743127315"
},
{
"id":"2",
"tel":"072245875"
},
{
"id":"3",
"tel":"0756129458"
How to check the entered data exists in database or not?
Dear Team, Greetings. I want to validate the one field with my mysql database. I am having one filed with hotel_name and i want to check that the entered hotel name is already exists in database or not. I am using Bootstrap, JQuery and PHP ad below is my code JQuery Code:- ------------------------------ $('#form_add_hotel').bootstrapValidator({ message: 'This value is not valid', live: 'enabled', feedbackIcons: { valid: 'glyphicon glyphicon-ok', invalid: 'glyphicon
Jquery1.7 Scheduler issue
Hai, I want to use Scheduler in my application, which version of jquery is supporting scheduler ?
jQuery bug - height() calculates rounded values
Hello I found a bug in jQuery today. the height() attribute calculates rounded off values mostly. am i right in thinking so?
Code getting triggered over the wrong element
<li class="fa fa-plus fa-fw menu-parent"><a href="#"><span> Productos </span></a> <ul class="menu-child"> <li class="fa fa-gift fa-fw"><a href="?mod=products"><span> Productos </span></a></li> <li class="fa fa-server fa-fw"><a href="?mod=products&action=categories"><span> Categorias </span></a></li> <li class="fa fa-apple fa-fw"><a href="?mod=products&action=brands"><span>
How to change a file's access path that is called in a function
I have a function that calls a particular file .pdf however need to be able to change this file access path, it is possible? <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script type="text/javascript"> $(function () { window.onload = function abrirPdf() { var iframe = $("#LoteSlips"); iframe.attr("src", '<%=arquivo%>_ERRO.pdf#zoom=200&page=<%=i%>'); };
how to validate the div id value using JQuery bootstrapValidator??
Dear Members, Greetings.. I want to validate the stars rating value that is stored in div Id and i want to use the div ID value to validate the stars rating in botstrapValidator. As, I know the methods, how to validate the input fields but dont knw how to validate the div id value.
Miltiple Ajax post call
I have been tried for whole day and still can't find a solution to my jquery multiple post request problem. When I fast click Button-A then Button-B to trigger ajax call, the result on success: $(ID).append(data) completely goes wrongly into different target ID. I tried set async:false but it is deprecated. I'm using jquery ver 1.11.2. Thank you in advance for any help.
click function (multiple clicks and multiple divs)
https://jsfiddle.net/zdtgo5zp/ I am struggling with the click function. I have three divs: one with some text that I want to change, and two divs that I want to be clickable. If I set up the click function to only work once on one of the divs, it works, BUT, I want to be able to click on it again and revert the text back to the original AND I want the process to work on multiple divs, which I am struggling with. Thank you in advance!!!
Next Page