FAQ Database Discussion Community


Fit an image inside a div that also has a title?

html,css,css3
Here's my fiddle Here's my HTML: <div class="block"> <h2>Title</h2> <img src="http://icons.iconarchive.com/icons/martz90/circle/512/camera-icon.png" /> </div> I'm trying to have an image inside my block. I want to size the image so that it fits inside the block fully. I've tried with height 100% but the title of the block is not taken...

Get elements containing text from array

javascript,jquery,html,arrays,contains
I want to search all the elements containing any string in the array. For example I have following list of items <ul> <li>cricket bat</li> <li>tennis ball</li> <li>golf ball</li> <li>hockey stick</li> </ul> and this array var arr = ['bat', 'ball']; It should select all the elements having text bat and ball....

CSS - Linear Gradient Background Color no-repeat is not working for if it has multiple tds

html,css,css3
I want to apply css3 gradient (left and right transparent) background color for a TR element like below. Below code is working fine if it has only one TD element, where as more than one td, background gradient started repeating for each td... Am I missing something? Online Demo CSS...

If checkbox checked, instantly alert

javascript,html,event-handling
So, my goal is this: if the checkbox is checked by the user, do something (let's say just an alert). Here's my code, that is not working: function validate() { if (document.getElementById('LetterNeed').checked) { alert("checked"); } else { alert("You didn't check it! Let me check it for you."); } } <input...

Dynamically add href based on Class name of parent list item

javascript,jquery,html
I need to add a href attribute to an anchor tag based on the class name of its parent list item. Example: Here is what I need: <li class="prefix_1"><a href="prefix_1">myText</a></li> <li class="prefix_2"><a href="prefix_2">myText</a></li> <li class="prefix_3"><a href="prefix_3">myText</a></li> I should also add that I am dynamically adding the class names to the...

Div is 100%width, but the browser still scrolls to the right

html,css
I am using October CMS for a project, but unfortunatley I am having problems. For one of my divs I have the background set to 100% width, however I am getting this problem where the div below it is smaller in width and the browser is scrolling to the right...

Why does vertical-align: middle causes other elements to misalign?

html,css,vertical-alignment
With this code: .header { background-color: #444; height: 56px; color: white; } a { padding: 20px; } input { background-color: #444; border: 0; line-height: 24px; margin-left: 10px; color: white; height: 56px; padding: 0; font-size: 20px; vertical-align: middle; } <div class="header"> <a href="#"> <img src="http://directoryapp.trimian.com/img/directory/ic_search_white.png" /> </a> <input placeholder="Search" /> </div>...

Get row index from row id and table id

javascript,html
I am trying to get Index no of a row when hyperlink is clicked i am passing some other data too from this tag <a href="javascript:void(0);" onclick="EditDoctorRow(' + RowCountDoctorVisit + ');"> <i class="fa fa-edit"></i> </a> I tried $('table#DoctorVisit tr#' + RowCount).index() $('table#DoctorVisit tr#' + RowCount).closest.index() But both are not working...

How to position “:before” element used as icon in zurb foundation's Side nav?

html,css,zurb-foundation
I added a sub-menu to foundation's side nav exactly like in this example, but the icon is above the text. My CSS: .hasChildren:before{ content: "\25ba"; float: left } .hasChildren.active:before{ content: "\25bc"; } My HTML: <div class="large-4 medium-4 columns menu-wrapper"> <div class="panel"> <h4>Menu</h4> <ul class="side-nav"> <li><a href="#">Link 1</a></li> <li><a href="#">Link 2</a></li>...

Django: show newlines from admin site?

python,html,django,newline,textfield
This is probably very simple. My database objects have a TextField. Now, when I add the contents of the TextFields to an html paragraph, there are no new lines. How can I make Django show those newlines? Thank you!

Dynamically select from a dynamically generated dropdown

php,html,select,drop-down-menu
I have a dynamically generated dropdown list - list of course identifiers and names. On the basis of a variable, “assigned_course_id”, I would like to preselect the appropriate value from the dropdown list. My best attempt is as follows. Thanks in advance for your assistance. <select name="course_id" id="course_id"> <?php $assigned_course_id...

Using jQuery to Popup iFrame from URL

javascript,jquery,html,jquery-mobile,iframe
I have inherited some code and I am trying to add an enhancement that will open a popup style iframe with the URL. The way the code is laid out is there are different tab-panes within the html window and in the "content" tab it displays information in the #post-body...

Setting up the page grid using push and pull

html,twitter-bootstrap,css3,twitter-bootstrap-3
I'm using Bootstrap and I'm having issues setting up my grid. How do I use bootstrap's push/pull to setup my columns as below? This is what I've got so far, <div class="row"> <div class="col-xs-5 col-sm-3 col-md-3">A</div> <div class="col-xs-7 col-sm-9 col-md-2 .col-md-push-7">B</div> <div class="col-xs-12 col-sm-12 col-md-7 .col-md-pull-9">C</div> </div> ...

fill an html table by column instead of row?

html,css,table
'<table> <tr> <th>' .$varProduct[$x][0]. '</th>'. //this is a title '<th>' .$varProduct[$x][2] . $varProduct[$x][11] . ' </th> // this is a price </tr> </table>' this code makes a table that fills out like this Title Price Title Price Title Price but I want to fill it Title Title Title Price Price...

jQuery click open one dropdown

javascript,jquery,html
In a site I have several 'dropdown' which become visible when you press a plus sign. I did this with jQuery (see code below), but when pressing the button every dorpdown opens. How can I only open the dropdown where the button is pressed (Without writing this code for every...

Give absolute url adress

html,path
i'm trying to understand absolute and relative Url adresses; however, when i attempted an exercise, i couldn't solve it. Here is the exercise: Given the following URL address http://www.unsite.org/a/b/index.html , the document index.html contains 3 relatives URL addresses: <img src="../logo.png" alt="Logo de l’entreprise"/> //Line 1 <img src="/images/logo.png" alt="Logo de l’entreprise"/>...

Select n elements from hover event

javascript,html,css
I would like to select n elements from the element recieving the hover event. Is this possible in CSS? E.g. In the example below, could I write CSS to select the next 2 items from the item reciving the hover event? <div class="row"> <div class="col-md-1 item"></div> <div class="col-md-1 item"></div> <div...

How to use template within Django template?

python,html,django,templates,django-1.4
I have the django template like below: <a href="https://example.com/url{{ mylist.0.id }}" target="_blank"><h1 class="title">{{ mylist.0.title }}</h1></a> <p> {{ mylist.0.text|truncatewords:50 }}<br> ... (the actual template is quite big) It should be used 10 times on the same page, but 'external' html elements are different: <div class="row"> <div class="col-md-12 col-lg-12 block block-color-1"> *django...

How to position div which contains font-awesome icons to centre of another div?

jquery,html,css,css3
I'm trying to position div which contains font-awesome icons to centre of another div but i cannot make it in the right way. I have following code: HTML: <div id="menuRightSide" > <div class="rightSideMenuItem"> <div class="fa fa-facebook fa-2x rightSideMenuItemIcon" ng-click="redirectToGamePage();" id="repeatIcon"></div> </div> <div class="rightSideMenuItem"> <div class="fa fa-twitter fa-2x rightSideMenuItemIcon" ng-click="redirectToGamePage();" id="repeatIcon"></div>...

show div only when printing

javascript,html,css
Let's say that I have <div id="printOnly"> <b>Title</b> <p> Printing content </p> </div> Is it possible to hide this div when page rendering and to show only when printing this div?...

Text-decoration/CSS causing text to move

html,css,wordpress
I've tried a bunch of techniques to solve this. I've used float (left/right) and played with positioning (absolute & relative). None worked. Basically my navigation keeps moving when the the text decoration (font-weight: bold; in this case) is applied. I'm new to CSS and this is my first header- so...

How to workaround a “negative” height and width?

javascript,jquery,html
I'm drawing a div on the document, but it only works when width and height are positives: var div; function onMouseMove (e) { div.height(parseInt(e.pageY) - parseInt(div.css("top")) ); div.width( parseInt(e.pageX) - parseInt(div.css("left"))); console.log(div.width()); console.log(div.height()); }; $(document).on("mousedown", function(e){ div = $("<div></div>").prependTo("body"); div.css({ "top": e.pageY, "left": e.pageX }); $(this).on("mousemove", onMouseMove); }); $(document).on("mouseup", function(){...

Can I uniquely identify 2 check boxes so that I can add a different image to each?

html,css,asp.net,checkbox
Currently I am using an image for checked and unchecked checkboxes the html and css is below. <div class="text-field-box text-field-box-mobile radio-button-box small"> <asp:CheckBox ID="ChkOffer1" text=" " runat="server" class="checkbox checkbox-mobile radio" Visible="true" EnableViewState="true"></asp:CheckBox> <% Response.Write(Session("Offer1"))%> </div> and css input[type=checkbox] { display:none; } input[type=checkbox] + label { background-image: url("checkbox-default.png"); background-repeat: no-repeat;...

AngularJS factory dependencies

javascript,html,angularjs,mongodb
I'm using AngularJS to extract information stored in mongodb. I'm trying to use a factory to retrieve that information using $http . I read so much information about how to do it, and no one works for me. Also I'm using node + express, the routes works fine. The problem...

Pass variable from Javascript to PHP to write to file

javascript,php,html,post
It could be duplicate cause unable to find answer even by searching similar questions of Stackoverflow. This is what I am trying to do. I need to pass a stored variable in JavaScript to PHP which would write it to temp file 'yy.html'. I could get alert from the submit...

What is the best way to make your text stay in the same line as your icons?

html,css
I'm trying to achieve this UI here I've tried CSS <style type="text/css"> #cb-key-danger{ width: 15px; height: 15px; background-color: #F46E4E; } #cb-key-warning{ width: 15px; height: 15px; background-color: #F9C262 ; } #cb-key-success{ width: 15px; height: 15px; background-color: #ADB55E; } .cb-key-row{ background-color: #E2E2E2 ; font-size: 10px; } .cb-key-row span { display: inline; }...

Button not center align in Safari

html,css,safari,center-align
Button not centered align in Safari browser JSFIddle HTML <div class="" style=" width: 100%; "> <input value="Button" class="center-block" type="submit" style=""/> </div> CSS .center-block { display: block; margin-right: auto; margin-left: auto; } Above problem just come in safari, in chrome and firefox it is ...

Automatically calling server side class without

javascript,html,ajax
I have an anchor which calls a server side class when clicked, but I want to modify it so that the class is called as soon as the page loads, without having to click an anchor. <a href="#" class="_repLikeMore" data-id="1234" data-type="pid" data-app="forums"> ...

Swap nav and div vertically uing CSS only

html,css,html5,css3
So I have a <nav> in my <header> tag and just below it I have a <div> which shows the date. Now the problem is, my design is in such a way that I cannot put the <div> for the date inside my <header>. However since I'm working with a...

Target next instance of an element/div

javascript,jquery,html
I have the following HTML structure and JavaScript file: .html <li> <button class="show-more"></button> some more elements <div class="hidden"></div> </li> JavaScript $( ".show-more" ).click(function() { event.preventDefault(); $( this ).next().slideToggle( "fast", function() { }); }); I need the click event to toggle the next first instance of .hidden, however the click event...

Detect when the jQuery UI slider is being moved?

jquery,html,css,jquery-ui
I have this custom video time UI slider to change the time of the YouTube video when scrubbed. My problem is that when the video is trying to load when the user is moving the slider, it causes the handle to jerk around and flip around. What I'm trying to...

drop down menu toggle does not work

jquery,html,css,css3
So I am trying to create a dropdown menu using jQuery and I have tried several things. I tried using .hover(), .click(), and mouseenter() for the user's action, but nothing seems to work. I even tried toggle() and slideDown() for the event but nothing shows up on the screen when...

Default scrollbar position

javascript,jquery,html,css,scroll
I'm building a chat application in which I need the scrollbar to be at the bottom of the chat window (last message) on page load. How do I accomplish this (Using jQuery or otherwise)? Here's the chat window div: <div id="ccwindow"> <div class="bubble me">Hey!</div> <div class="bubble you">Hello</div> <div class="bubble me">I...

bootstrap - dynamically changing jumbotron background image

javascript,jquery,html,css,bootstrap
I'm trying to change the background image of the jumbotron div with jQuery when a new tab is clicked, like this: $(".about").click(function(){ $('.active').toggleClass('active'); $('.about').toggleClass('active'); $('.jumbotron').fadeOut(500); //change background image $('.jumbotron').fadeIn(500); }); I tried using $('.jumbotron').css('background-image',url('/path/to/new/image')); but when I include that line, the jumbotron background image doesn't display at all even before...

Setting radio button checked true on button click

javascript,jquery,html
I have a table cell that lights up when selected. There will be many buttons on the page but only one choice can be made at a time. How can I make them mutually exclusive using hidden input radio tags? (in order to handle the group later) <td class="choice-option"> <input...

change css dynamically by selecting dropdown list item

jquery,html,css,drop-down-menu
I have the following Dropdownlist with yes or no options-:` <asp:DropDownList ID="ddlchangecss" runat="server"> <asp:ListItem Text="yes">yes</asp:ListItem> <asp:ListItem Text="no"></asp:ListItem> </asp:DropDownList> i want to add a css dynamically like that-: .imgFullWidth { width: 100%; height: auto; float: left; margin: 0px 0px 20px 0px; } when I select yes option in Dropdownlist. How can...

unable to apply toggleclass for bg after js script execution

javascript,jquery,html,css
i have this button on a page ... <div id="bgtoggle"> </div> i also have this script on the index page <script> $(document).ready(function(){ $("#bgtoggle").click(function () { $(".metro").toggleClass("bgcolorchange"); }); });</script> the class bgcolorchange has this css .bgcolorchange { background-image: url("../images/mthc/music-therapy-imageN.jpg"); -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; overflow : hidden ;...

How can I make a list horizontally scrollable without items going to the second line?

html,css
I have a list of items: <div class="dates-bar"> <ul> <li>1</li> <li>...</li> <li>30</li> </ul> </div> I need this bar to be in a single line. I don't know how to achieve that. I have tried the following: .dates-bar { width: 100%; overflow-x: scroll; } .dates-bar ul { width: 500%; } .dates-bar...

Click on link next link should be display on same page

javascript,php,jquery,html,css3
I have a single page website and need to link the navigation to IDs in the page. I have three links: "About us", "Our Project", "contact". So if user clicks on "About ", the About section will be displayed, same with other links. Inside Our project there is Two buttons...

How to change my table based on screen size?

javascript,html,css,html5
I want to change my table so it would look nice on a mobile platform. All I want to do is change my table so it is two columns. I am using this code to send an email. So I cannot link a stylesheet to my html. It is recommended...

Can't get value from xpath python

python,html,xpath,web-scraping,html-parsing
I want to get values from page: http://www.tabele-kalorii.pl/kalorie,Actimel-cytryna-miod-Danone.html I can get all values from first section, but I can't get values from table "Wartości odżywcze" I use this xpath: ''.join(tree2.xpath("//html/body/div[1]/div[3]/article/div[2]/div/div[4]/div[3]/div/div[1]/div[3]/table[1]/tr[3]/td[2]/span/text()")) But I'm not getting anything. With xpath like this: ''.join(tree2.xpath("//html/body/div[1]/div[3]/article/div[2]/div/div[4]/div[3]/div/div[1]/div[3]/table[1]/tr[3]/td[2]//text()")) I'm...

How can I iterate through nested HTML lists without returning the “youngest” children?

javascript,jquery,html,list,loops
Fiddle: https://jsfiddle.net/zayjeLrk/12/ I want to iterate through an HTML nested list that is 3-layers deep. <ul> <li>animals <ul> <li>birds <ul> <li>crow</li> <li>parrot</li> </ul> </li> <li>reptiles</li> </ul> </li> <li>plants</li> <li>bugs</li> </ul> I want it to iterate through the list so that it returns the elements in this order (note, this isn't...

multiple slidershows on one site?

javascript,html
javascript newbee here :| I created a slidershow, but i need to add 4 more slidershows on my website, if i add more slidershows only the first slidershow works, the other stand still :/ can someone explain me, what i need to change, to get multiple slidershows on my website?...

How do I retain search engine accessibility when loading external file into html

javascript,jquery,html,seo,cross-platform
I plan to: $('#main.sidecontent').load('/sidecontent.html'); and insert: <div class="sidecontent" id="main"></div> a div on several html pages since the content of this div is the same and I try to straighten my workflow, basically avoiding editing every single html page when this content div changes. My questions: Is this method recommended for...

Iframe does not show scrollbar

html,css,angularjs,iframe,ionic
Can't seem to make the iframe appear with a scroll-bar. Go to https://billiving-qa.azurewebsites.net/accountant email: [email protected] pass: 111111 Reload the list with F5, then click new invoice on the right side. The content is lengthy but doesn't show the scroll-bar. My css uses the following: .frm { position: fixed; width: 100%;...

BeautifulSoup is not getting all data, only some

python,html,web-scraping,beautifulsoup,html-parsing
import requests from bs4 import BeautifulSoup def trade_spider(max_pages): page = 0 while page <= max_pages: url = 'http://orangecounty.craigslist.org/search/foa?s=' + str(page * 100) source_code = requests.get(url) plain_text = source_code.text soup = BeautifulSoup(plain_text) for link in soup.findAll('a', {'class':'hdrlnk'}): href = 'http://orangecounty.craigslist.org/' + link.get('href') title = link.string print title #print href get_single_item_data(href) page...

Dynamically resize side-by-side images with different dimensions to the same height

javascript,html,css,image
I have two images side-by-side within a block-level container with arbitrarily different dimensions (as in, they could be any two images) that I want to dynamically adjust the width of so that the overall height of the two images is the same. I don't think this can be done in...

How to remove all the borders of a selectbox?

jquery,html,css,drop-down-menu
How can I remove the all the borders of the selectbox using css or Jquery ? My code, <select id="doctor_ch"> <option value="1" selected>One</option> <option value="2">Two</option> </select> CSS #doctor_ch{ background-color: #88AFF2; color:#fff; margin-top: 15px; } When I use this code it only changes the arrow style. I want to remove the...

Tagging values in HTML document for automated extraction

html,xml,html5
We have a series of documents that are being converted to HTML for web access. The documents are operating instructions that list actions people have to do as well as distinct requirements. We wanted to put a tag around each requirement so it can be automatically extracted using some code....

HTML/Java: .exists() always returns true

javascript,html,exists,rft
I have the following code. The site has a tab that only shows up once something happens. I'm testing to see if the tab is showing up but it always returns true. if (html_tab1().exists() == true) { //Some code } I think the problem is the way the html hides...

Difficulty applying two different scripts

javascript,jquery,html,css
I have this script embedded on the index page of my site: $(document).ready(function(){ $(".bgtoggle").click(function () { $(".metro").toggleClass("bgcolorchange"); }); }); The CSS classes the script refers to look like this: .bgcolorchange { background-image: url("../images/mthc/imageN.jpg"); -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; overflow : hidden ; margin:0; padding:0; z-index:3; } .metro...

Stop propagation to appended element

jquery,html
I append <a> tag to my div : $('<a class="dz-jcrop" href="http://www.google.com" >google</a>').appendTo('.dz-image-preview'); I want to stop propagation for <a> tag .. but when I try just to select the element I can't. I use the following code to log to test if my element is selected : $(document).on('click', '.dz-jcrop', function(){...

Angular-strap data-trigger='focus' not working

javascript,html,angularjs,angular-strap
the data-trigger focus is not working for me ... <span data-content='foo' data-html='true' data-placement='top' data-container='body' data-trigger='focus' bs-popover> Nothing is actually happening when I am clicking on this element. If I remove data-trigger='focus' and set it to hover or click, it does work. I am using angularjs. 1.2.18 and angular-strap : 2.2.4...

Add CSS3 transitions to jQuery Animate script

javascript,jquery,html,css,css3
Below I have a script that loads images in a random order and flies them onto the screen beside each other. You can find the script here: https://jsfiddle.net/38e126f4/ I would now like to be able to add different random CSS3 transition effects to each image as they fly onto the...

How do I display my mysql table column headers in my php/html output?

php,html,mysql,table,data
2 Questions... Scenario: I would like to query my database table via a form and then display the results that occur(if there are results) and my current situation is that it does work but it clears the form completely and leaves my to an empty page with just the results...

CSS bouncing line loader animation

html,css,animation
Im trying to create a simple loader animation that draws a line back and forth but currently is moving only in one direction. As soon as it reaches the middle of the animation it does not animate in the oposite direction. This is my css @keyframes loader-animation { 0% {...

Adding horizontal space between 2 buttons using javascript

javascript,jquery,html,css
I am dynamically creating submit buttons using javascript. I wanted to know how to introduce horizontal spacing between every other button in the process. My code is var allFields = commonButtons.concat(extraFields); for (var i = 0; i < allFields.length; i++) { var node = document.createElement("input"); var btName = document.getElementById("submit-buttons"); node.setAttribute('data-value',...

How to get the value of an html attribute

javascript,jquery,html
I have the following jquery code : $j = jQuery.noConflict(); function displaySelected(elem){ var value = $j(elem).find(".columnToHide").html(); console.log(value); } The out put of this is : <div class="hiddenId" data="a05o000000V88VFAAZ"></div>. However, I would like to only get the value in the data tag i.e. the id. I know you can do something...

Aligning two elements in a container using css?

html,css
I like to make my navigation bar and header all the same, but I can't get the navigation bar to align properly. Using float: right doesn't work, as it appears to take it out of the container (if that makes sense) My code is here: https://jsfiddle.net/AVY7T/228/...

show/hide an overflow div on anchor

javascript,jquery,html,scroll
I'm trying to make a div appear (if not already visible) and be scrolled to a specific anchor. I found this answer and try to use it but it looks like it doesn't work well... http://stackoverflow.com/a/7513110/3703099 My code : http://jsfiddle.net/0sq2rfcx/9/ As you can see, when you click on button it...

How can I keep a group of buttons centralized on the right side of the footer?

html,css,button,footer
I've been trying to keep four buttons centralized on the right side of the footer, but it seems like the footer is set to percentage instead of pixels, I've tried to set it to percentage, but it ignores my "orders", how can I set the footer to 60px, and put...

Geolocation to find nearest place [on hold]

php,html,mysql,geolocation
I have a database of national park names (Alcatraz Island, Death Valley, Biscayne, etc.) which all have coordinates. What's the simplest way for me to match the closest park in my database to their current location whether on a mobile device or on a desktop?...

Unable to display SQLite data as listview using phonegap

javascript,html,sqlite,cordova
The function get_list() here is able to execute the query but not able to display the rows. function get_list() { db = window.openDatabase("timeDB", "1.0", "time", 200000); db.transaction(populateDB, transaction_error, populateDB_success); function populateDB(tx) { tx.executeSql("SELECT (date) FROM time", [], function (tx, res) { var len = result.rows.length; if (len > 0) {...

angular.js - simplest way to handle click inside controller

javascript,jquery,html,angularjs
is there any better way of handling clicks inside a controller than this? <div ng-controller="SomeController> <a href="/#!/something" ng-click="doTheSame()">link1</a> <a href="/#!/something" ng-click="doTheSame()">link2</a> <a href="/#!/something" ng-click="doTheSame()">link3</a> .. <a href="/#!/something" ng-click="doTheSame()">link99</a> </div> in jQuery I would do something like: $('div > a').on('click', function() { // do some stuff }); ...

Website showing differently in windows xp and mobile

html,css
I made a website for one of my clients, and I change the background and font color. Now on windows xp and smartphones the background changed color to the default color and the fonts remained the same. The website is simfest.ro I don't know what to do to make it...

Pure Css transition slide down panel not working

html,css,css3
Im trying to make slideDown Menu on hover.So on hovering HButton3 i want to extend the height of AccomodationPanel so that the buttons inside it display becasue the extend but nothing happens on hover it looks like its something in the position of the elements HTML : <asp:Panel runat="server" ID="Header"...

why i don't get return value javascript

javascript,jquery,html,json,html5
When i debug my code i can see i have value but i don't get value to createCheckBoxPlatform FN function createCheckBoxPlatform(data) { var platform = ""; $.each(data, function (i, item) { platform += '<label><input type="checkbox" name="' + item.PlatformName + ' value="' + item.PlatformSK + '">' + item.PlatformName + '</label>' +...

Add Extension to Index File

html,css
I've been searching online for an answer to this but I can't seem to find anything which can help. I was wondering if its possible to open a index.html file with an extension after the .html (for example it would open a file like this - index.html?lc=uk) automatically when you...

How to set DIV's width based on CSS indexes

html,css
I have 6 floated DIVs in two rows. I use PocketGrid as CSS framework (in particular its "automatic rows" feature) and I would like to size each one using CSS indexes and not specific class name. I tried it in this jsFiddle but even if first 3 blocks (first row)...

Show only the requested forms using JS

javascript,jquery,html,html5,forms
As the image below illustrates, I have two forms and two buttons. Currently all the forms are visible. How can I only show the requested form "according to the option they have selected (from the blue buttons on the top)"? So, if the user clicked on the "send an invite"...

How do you make a div only extend in one direction when the outer container size increases?

javascript,html,css,css3,layout
I'm trying to make a a page container with a navigation bar on the left (inside of the container). When the outer page is wider than the container, I would like just the navigation bar to extend left up to a certain size while the rest of the container's contents...

Adding tabindex to all the DIVs

html,accessibility,jaws-screen-reader,accessible
I know DIVs and P elements are not inherently focusable and can be made to be one by adding tabindex attribute. I am trying to make a Screen Reader friendly website and was wondering if it is necessary to have tabindex on each and every DIVs and P on my...

HTML CSS Two 2-column tables side by side with same height and width

html,css
I'm quering a MySQL database and use a script to put results into an automatically generated HTML-file. I have two tables with 2 columns and 4 rows each that need to be put side-by-side. I have put my html & css in fiddle. http://jsfiddle.net/mika6891/7b0k049r/1/ My HTML code: <!-- gene description...

Binding Checkbox to td element

javascript,jquery,html
I'm currently developing a web application that populates a table (using the dynatable jquery plugin) using json. One of my needs is to bind a checkbox to a particular column (email) and to be able to retrieve a list of selected addresses and convert them into a comma separated string....

Show and hide column in a table using drop down

javascript,jquery,html,table,drop-down-menu
I have a table, which looks exactly like this one: https://www.datatables.net/examples/api/show_hide.html I now want to replace the headers (the th things) with a drop down. I want to hide and show columns thanks to those drop downs (they can click and show what they want). I was also wandering if...

Update input number variable onclick

javascript,jquery,html,function
I am trying to create a calculator style thing, where you put in how many years into a input, you hit submit and it gives you different results below without reloading the page. I have all the calculations working right now, but I just cant get the input number variable...

Fancybox thumbnail is not working

javascript,jquery,html,css,fancybox
I'm trying to imitate this jsfiddle: http://jsfiddle.net/kevin11189/uZCC6/1269/ however the thumbnails are not appearing. Here's my code: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title>Gallery</title> <meta name="description" content="An interactive getting started guide for Brackets."> <link rel="stylesheet" href=""> <style> .hidden { display: none; } </style> <!-- Add jQuery library -->...

Get info from dynamic/growing form

javascript,jquery,html
Have a form to create a contract, where that contract can have one or more users associated. The area to input the users info, starts with only one field of one user, and one button to add more fields if needed. <div id="utilizadores" class="row"> <div id="utilizador1" class="container-fluid"> <div class="row"> <div...

tag in HAML

html,css,haml
How do I create a I-tag in haml? Example: <i class="fa fa-search"></i> ...

HTML elements in Angular bindings expression

html,angularjs
Is that possible to insert HTML elements in an Angular expression ? Let's take a few example. I would like to do something like this: <table> <tr ng-repeat="employee in employees"> <td>{{employee.firstname ? employee.firstname : '<p style="color:red">No name</p>'}}</td> <td>{{employee.job}}</td> </tr> </table> In our controller, we have: $scope.employees = [{firstname:'Bob', job:'Developer'}, {firstname:'Paul',...

Top header 100% of screen, but body only 70%?

html,css
Pretty new to CSS and just having quite a bit of trouble, I've tried everything, searched here, but can't seem to make it work. Right now my header/body are both 70% of the screen. However I want my top header (.mainheader) to be 100% of the screen, but have the...

What is the semantic HTML tag to display for URLs that are not links?

html,html5,url,tags,semantics
I have a search engine plugin that outputs results in a basic structure: <a href="page url"> <div class="searchResult"> <h3>Page title</h3> <p>Page url</p> <p>Page <meta> description</p> </div> </a> The plugin is designed to integrate into an existing website so it has no default styling. However, websites are supposed to be usable...

submitting form then showing loading image by javascript

javascript,html
I am submitting a form and loading loading gif in the same div by replacing html of form by html of loading image. I am first submitting the form then loading gif, because I have to replace the content of div(in which form exist) with loading image. Logs 1,2,3 are...

Trying to dynamically create divs that can also be closed

javascript,html,dynamic
I'm trying to create a simple note taking application. Right now I am trying figure out how to dynamically create and delete DIV elements. I can create DIVs, but each time I add a new div it adds a "Close" "X" to each previous div. So my question is how...

Django: html without CSS and the right text

python,html,css,django,url
First of all, this website that I'm trying to build is my first, so take it easy. Thanks. Anyway, I have my home page, home.html, that extends from base.html, and joke.html, that also extends base.html. The home page works just fine, but not the joke page. Here are some parts...

Placeholder in javascript with val()

javascript,jquery,html
I can not understand Javascript language properly, I am trying to write inside placeholder but it is not working, here is my code <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>val demo</title> <script src="https://code.jquery.com/jquery-1.10.2.js"></script> <script type="text/javascript"> $(document).ready(function() { $('#myInputText').keyup(function() { $('#myOutputText2').val('placeholder="' + $(this).val() + '"'); $('#myDIVTag').html('<b>' + $(this).val()...

How to add an element with jQuery or Javascript

javascript,jquery,html
I want to know how to add an HTML element with jQuery or Javascript after another element for example, from this <ul> <li> .... </li> <li> .... </li> <li> .... </li> </ul> to this <ul> <li> .... </li> <div>..</div> <li> .... </li> <div>..</div> <li> .... </li> <div>..</div> </ul> ...

JQuery UI slider - value slider 2 determined value slider 1

javascript,jquery,html,jquery-ui,jquery-ui-slider
Ive been trying to get with JQuery UI slider the following to work. Ive got 2 sliders, one is a amount the other is a duration. When the amount is lower then 200 you can select 15 and 30 days. If the amount is higher than 200 only 30 days...

BeautifulSoup: Parsing bad Wordpress HTML

python,html,regex,wordpress,beautifulsoup
So I need to scrape some a site using Python but the problem is that the markup is random, unstructured, and proving hard to work with. For example <p style='font-size: 24px;'> <strong>Title A</strong> </p> <p> <strong> First Subtitle of Title A </strong> "Text for first subtitle" </p> Then it will...

Update iframe src attribute dynamically with JavaScript

javascript,html,iframe
I'm trying to update an iframe on a page using JavaScript, but it's not working. This example seems pretty straightforward, but the page is not loading the iframe with the new page once I click the button. I'm doing this all locally. <html> <body> <script> function changeIframeSrc() { document.getElementById('myFrame').src =...

Div with the form of a pencil [duplicate]

html,css,css-shapes
This question already has an answer here: CSS triangle custom border color 2 answers How can i create a div with the form of a pencil, just like this: It seems a basic thing but im trying to do it since some time ago and still couldnt do it....

Getting nearest text box to radio button in table

javascript,jquery,html
I am having trouble getting the text box nearest to my selected radio button. Here is what I have tried so far which keeps returning me 'undefined'. HTML: <fieldset class="capacity-field"> <legend>Capacity</legend> <table style="margin-bottom: 20px"> <tr> <td> <input type="radio" name="capacity" value="raw" checked>Raw (TB): </td> <td> <input type="text" name="raw-capacity" value="256" size="2"> TB...

How to make background body overlay when use twitter-bootstrap popover?

html,css,twitter-bootstrap
Currently I used this twitter-bootstrap popover: <button type="button" class="btn btn-default" style="margin-top:11px; padding-bottom:4px; padding-top:4px;" data-container="body" data-toggle="popover" data-trigger="focus" data-placement="left" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus."> Upgrade The output: How I can make the background overlay like bootstrap modal? My expected output I use this jquery to popover $(function(){ $('[data-toggle="popover"]').popover({ placement...

How to make an element disappear by clicking off it

javascript,jquery,html,css
I want to make a search that displays results right underneath it in a div that displays above other elements on the page (like an auto-complete or the address bar on chrome). I want to the results to stay visible wherever the mouse is, but disappear if the user clicks...

copy last column of one table to another table based on some condition

jquery,html
I have two tables. I want to take last column of table3 and put in to table4 eg:- table3 Names Process_id total construction 1 1111 construction_1 1 0000 engineering 1 2222 permitting 1 3333 eg:- table4 Names Process_id construction 1005 engineering 1005 permitting 1005 final result of table4 output will...

Centering navbar pills vertically within the navbar using flexbox

html,css,twitter-bootstrap,flexbox
I am terrible at CSS so I am having trouble centering my <li> (navbar pills) vertically for my navbar. This navbar is from twitter bootstrap Here is the HTML for my navbar: <div class="container"> <nav class="navbar navbar-default navbar-fixed-top"> <ul id="nav_pills" class="nav nav-pills" role="tablist"> <li role="presentation"> <a href="/">About</a> </li> <li role="presentation">...

CSS :hover that shows more than one image

html,css,css3
I have an icon on my website. I want to change the icon to 4 different images when ever I hover over the first one. So I know how to switch between the regilar image to yellow0.png, but how do I continue to the next one (after half a second...

Background-image style with JS not working in ie9

javascript,jquery,html,internet-explorer
I'm working on a site and im having some issues with my slider in IE9. What I've done is that I've made a div that gets the background image changed every few seconds depending on the img tags within. You can see it in function here: http://diakondk.quine.pil.dk/ It works wonders...

How to remove unmatched row in html table using jquery

jquery,html
I have two tables. I want to delete unmatching rows. Compare with first column in Table1 and compare with first column in Table2. Table1 111 aaa 222 bbb 333 ccc Table2 333 xxx 444 zzz 111 vvv result of Table2 333 xxx 111 vvv I tried some thing here Please...

add value to existing class in jQuery

javascript,jquery,html,css
EDIT - included the page where the problem is visualized - http://www.openmindedmedia.nl/testfase/julius/ First of all, I have searched quite some hours to find this.. I presume it has an easy fix but I'm really new to jQuery and Javascript, so I'm here for your help. The problem I'm working with...