mot01 sends brownie points to @caixeta-paula :sparkles: :thumbsup: :sparkles:
:cookie: 271 | @caixeta-paula |http://www.freecodecamp.com/caixeta-paula
mot01 sends brownie points to @korzo and @gersho :sparkles: :thumbsup: :sparkles:
:cookie: 570 | @korzo |http://www.freecodecamp.com/korzo
:cookie: 497 | @gersho |http://www.freecodecamp.com/gersho
var tags = getElementsByTagName('ul');
tags[0].append...
something like that maybe?
getElementsByTagName('ul')[0].appendChild()
as long as you are sure at lest one element exists
gersho sends brownie points to @njm8 :sparkles: :thumbsup: :sparkles:
:cookie: 283 | @njm8 |http://www.freecodecamp.com/njm8
halohah sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3334 | @khaduch |http://www.freecodecamp.com/khaduch
/* css for old browsers */
@supports (display: grid) {
/* css for grid supported browsers */
}
@supports
is not supported by IE ;)
linkin-park sends brownie points to @longnt80 and @masd925 :sparkles: :thumbsup: :sparkles:
:cookie: 577 | @longnt80 |http://www.freecodecamp.com/longnt80
:star2: 4518 | @masd925 |http://www.freecodecamp.com/masd925
zerka1982 sends brownie points to @longnt80 :sparkles: :thumbsup: :sparkles:
:cookie: 578 | @longnt80 |http://www.freecodecamp.com/longnt80
x140hu4 sends brownie points to @masd925 :sparkles: :thumbsup: :sparkles:
:star2: 4519 | @masd925 |http://www.freecodecamp.com/masd925
```
your code here
```
@if(!isset($collateral))
@if(isset($data))
@if($data['basicInfo']->globalStatus == 'Collateral' && Auth::user()->department != 'Collateral')
@elseif($data['basicInfo']->globalStatus == 'Collateral' && Auth::user()->department == 'Collateral')
<button type="button" id="reviewApp" data-toggle="tooltip" data-placement="top" title="@lang('util.review')" section="loanInfo" class="btn bg-red btn-circle-lg waves-effect waves-circle waves-float" style="position: fixed; bottom: 15px; right: 75px; z-index: 9999;">
<i class="material-icons" style="color: white;">note_add</i>
</button><button type="button" id="saveLoan" data-toggle="tooltip" data-placement="top" title="@lang('util.savebtn')" data-trigger ="hover" section="loanInfo" class="btn bg-red btn-circle-lg waves-effect waves-circle waves-float" style="position: fixed; bottom: 15px; right: 15px; z-index: 9999;">
<i class="material-icons" style="color: white;">save</i>
</button>
@elseif($data['basicInfo']->globalStatus == 'declined' || $data['basicInfo']->globalStatus == 'cancelled')
<button type="button" id="reviewApp" data-toggle="tooltip" data-placement="top" title="@lang('util.review')" section="loanInfo" class="btn bg-red btn-circle-lg waves-effect waves-circle waves-float" style="position: fixed; bottom: 15px; right: 15px; z-index: 9999;">
<i class="material-icons" style="color: white;">note_add</i>
</button>
@elseif($data['basicInfo']->globalStatus != 'Collateral')
<button type="button" id="reviewApp" data-toggle="tooltip" data-placement="top" title="@lang('util.review')" section="loanInfo" class="btn bg-red btn-circle-lg waves-effect waves-circle waves-float" style="position: fixed; bottom: 15px; right: 75px; z-index: 9999;">
<i class="material-icons" style="color: white;">note_add</i>
</button><button type="button" id="saveLoan" data-toggle="tooltip" data-placement="top" title="@lang('util.savebtn')" section="loanInfo" class="btn bg-red btn-circle-lg waves-effect waves-circle waves-float" style="position: fixed; bottom: 15px; right: 15px; z-index: 9999;">
<i class="material-icons" style="color: white;">save</i>
</button>
@endif
@else
<button type="button" id="saveLoan" data-toggle="tooltip" data-placement="top" title="@lang('util.savebtn')" section="loanInfo" class="btn bg-red btn-circle-lg waves-effect waves-circle waves-float" style="position: fixed; bottom: 15px; right: 15px; z-index: 9999;">
<i class="material-icons" style="color: white;">save</i>
</button>
@endif
@endif
$('#saveLoan').click(function(){
// $('[data-toggle="popover"]').popover();
var objects = {};
if(checkForEmpty()){
swal('@lang("util.youmust")');
return;
}
for(var k in ents){
objects[ents[k]] = convertToArray(ents[k]);
}
@if(isset($collateral))
objects['collateral'] = true;
objects['loanIdNumber'] = '{{$data["basicInfo"]["loanIdNumber"]}}';
objects['transit'] = '{{$data["basicInfo"]["transit"]}}';
objects['cifkey'] = '{{$data["basicInfo"]["CifKey"]}}';
@endif
$.ajax({
type : 'Post',
data : {
_token : '{{csrf_token()}}',
data: objects,
},
url : '{{url("autosave/app")}}',
dataType : 'json',
success: function(data){
if (data.message == 'success') {
@if(isset($collateral))
window.history.back();
@else
window.location = '{{url("DRT/LoanRegister")}}';
@endif
}
},
error: function (jqXHR, exception) {
console.log(jqXHR.responseText);
}
});
});
cornielle sends brownie points to @aplchian :sparkles: :thumbsup: :sparkles:
:cookie: 374 | @aplchian |http://www.freecodecamp.com/aplchian
a freeCodeCamp project by kbaig
is in the middle of the board though
howdyhero sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
:cookie: 183 | @piteto |http://www.freecodecamp.com/piteto
// Setup
var collection = {
"2548": {
"album": "Slippery When Wet",
"artist": "Bon Jovi",
"tracks": [
"Let It Rock",
"You Give Love a Bad Name"
]
},
"2468": {
"album": "1999",
"artist": "Prince",
"tracks": [
"1999",
"Little Red Corvette"
]
},
"1245": {
"artist": "Robert Palmer",
"tracks": [ ]
},
"5439": {
"album": "ABBA Gold"
}
};
// Keep a copy of the collection for tests
var collectionCopy = JSON.parse(JSON.stringify(collection));
// Only change code below this line
function updateRecords(id, prop, value) {
/* if (prop==="tracks") {
id.tracks.push(value);
}*/
var get = collection["2468"].prop;
return get;
}
// Alter values below to test your code
updateRecords(5439, "tracks", "kukhövve");
moigithub sends brownie points to @iangracia :sparkles: :thumbsup: :sparkles:
:cookie: 346 | @iangracia |http://www.freecodecamp.com/iangracia
var get = collection["2468"][prop];
piteto sends brownie points to @iangracia :sparkles: :thumbsup: :sparkles:
:cookie: 347 | @iangracia |http://www.freecodecamp.com/iangracia
["1999", "Little Red Corvette"]
var get = collection["2468"][prop]; // ["1999", "Little Red Corvette"]
moigithub sends brownie points to @orangekulture :sparkles: :thumbsup: :sparkles:
:cookie: 471 | @orangekulture |http://www.freecodecamp.com/orangekulture
piteto sends brownie points to @iangracia :sparkles: :thumbsup: :sparkles:
orangekulture sends brownie points to @moigithub :sparkles: :thumbsup: :sparkles:
:star2: 3651 | @moigithub |http://www.freecodecamp.com/moigithub
It looks like there are some conditions to consider to pass that challenge
If prop isn't "tracks" and value isn't empty (""), update or set the value for that record album's property.
masd925 sends brownie points to @iangracia :sparkles: :thumbsup: :sparkles:
:cookie: 348 | @iangracia |http://www.freecodecamp.com/iangracia
pickorita sends brownie points to @iangracia :sparkles: :thumbsup: :sparkles:
:cookie: 349 | @iangracia |http://www.freecodecamp.com/iangracia
var collection = {
"2548": {
"album": "Slippery When Wet",
"artist": "Bon Jovi",
"tracks": [
"Let It Rock",
"You Give Love a Bad Name"
]
},
"2468": {
"album": "1999",
"artist": "Prince",
"tracks": [
"1999",
"Little Red Corvette"
]
},
"1245": {
"artist": "Robert Palmer",
"tracks": [ ]
},
"5439": {
"album": "ABBA Gold"
}
};
// Keep a copy of the collection for tests
var collectionCopy = JSON.parse(JSON.stringify(collection));
// Only change code below this line
function updateRecords(id, prop, value) {
if (value=="") {
delete collection[id][prop];
return collection;
}
switch(prop) {
case "tracks":
if (collection.hasOwnProperty(prop)) {
collection[id][prop].push(value);
}
else {collection[id][prop]= [value];}
break;
default:
collection[id][prop] = value;
}
return collection.hasOwnProperty(prop);
}
// Alter values below to test your code
console.log(updateRecords(2468, "tracks", "Free"));
wnghero sends brownie points to @iangracia :sparkles: :thumbsup: :sparkles:
:cookie: 350 | @iangracia |http://www.freecodecamp.com/iangracia
// Setup
var collection = {
2548: {
album: "Slippery When Wet",
artist: "Bon Jovi",
tracks: [
"Let It Rock",
"You Give Love a Bad Name"
]
},
2468: {
album: "1999",
artist: "Prince",
tracks: [
"1999",
"Little Red Corvette"
]
},
1245: {
artist: "Robert Palmer",
tracks: [ ]
},
5439: {
album: "ABBA Gold"
}
};
// Keep a copy of the collection for tests
var collectionCopy = JSON.parse(JSON.stringify(collection));
// Only change code below this line
function updateRecords(id, prop, value) {
if(value !== "" && prop !== "tracks"){
collection[id][prop] = value;
} else if(prop=="tracks"&&value!==""&&collection[id][prop]===undefined){
collection[id][prop] = [];
collection[id][prop].push(value);
} else if(prop=="tracks"&&value!==""){
collection[id][prop].push(value);
} else if(value===""){
delete collection[id][prop];
}
return collection;
}
// Alter values below to test your code
updateRecords(5439, "tracks", "Take a Chance on Me");
@JustineDiza
Hi! Does anyone here use UI Router? I have a problem with my code, been trying to find other solutions for about an hour now, help is pretty much appreciated!
Here's my HTML base:
<ul class="formSteps uk-margin-large-top">
<li ui-sref-active="active">
<a ui-sref=".substep" class="removeLink">Basic Information</a>
</li>
<li ui-sref-active="active">
<a ui-sref=".step_four" class="removeLink">Business Information</a>
</li>
<li ui-sref-active="active">
<a ui-sref=".step_five" class="removeLink">Business Activity</a>
</li>
<li>
<a class="removeLink">Documents</a>
</li>
<li>
<a class="removeLink">Gallery</a>
</li>
<li>
<a class="removeLink">Employee</a>
</li>
<li>
Complete
</li>
</ul>
<!-- Substeps for step1 go here -->
<div ui-view="substep"></div>
<div class="br-form-container">
<div class="page-header text-center">
<!-- Our nested state views will be injected here -->
<div ui-view></div>
</div>
</div>
Here's my route.js:
// Adding state for substeps
.state('business_registration.substep', {
url: '/1-sub',
data: { activeTab: 'business'},
controller: 'AccountBusinessController',
params: {
businessType: null
},
controllerAs: 'abc',
views: {
'': {
templateUrl: 'business/step1.html'
},
'substep@business_registration.substep': {
templateUrl: 'business/substep.html'
}
}
})
What I'm trying to do is to have 2 separate step progress counter, where the substep consists of substeps for different views, but it doesn't show up in the page.
var x = 0;
x += 1.01;
x += 2.05;
console.log(x);
//why does this equal 3.0599999999999996
//and not 3,06???
piteto sends brownie points to @iangracia :sparkles: :thumbsup: :sparkles:
:cookie: 352 | @iangracia |http://www.freecodecamp.com/iangracia
iangracia sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
:cookie: 185 | @piteto |http://www.freecodecamp.com/piteto
var x = 0;
x += 1.01;
x += 2.05;
console.log(Number(x.toFixed(2)));
// or
console.log(Number(parseFloat(x).toPrecision(12)));
piteto sends brownie points to @iangracia :sparkles: :thumbsup: :sparkles:
var x = 0;
x += 1.01;
x += 2.05;
x = preciseValue(x);
console.log(x);
function preciseValue(num) {
return Number(parseFloat(num).toPrecision(12));
}
https://twitter.com/intent/tweet?text="your quote text"
var x = 3.0599999999999996;
console.log(Number(x.toPrecision(1))); // 3
console.log(Number(x.toPrecision(2))); // 3.1
console.log(Number(x.toPrecision(3))); // 3.06
console.log(Number(x.toPrecision(4))); // 3.06 ????
console.log(Number(x.toPrecision(7))); // 3.06????
console.log(Number(x.toPrecision(9))); // 3.06???
piteto sends brownie points to @iangracia :sparkles: :thumbsup: :sparkles:
mroolong sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
:cookie: 186 | @piteto |http://www.freecodecamp.com/piteto
textContent
instead of innerHTML
, but it may not matter based on the content of your quotes.
@media (max-width: 500px) {
.wrapperimages-parent {
flex-direction: column;
justify-content: space-around;
align-items: center;
}
}
.wrapperimages {
display:flex;
justify-content:center;
margin:auto;
}
```
<div class="wrapperimages">
<section class="portfolio">
<ul class="portfolio-grid portfolio-galery-3 clearfix masonry" id="portfolio-grid">
<li class="portfolio-item mix cat1">
<div class="portfolio-style-1 entry wow fadeIn" data-wow-duration="1s" data-wow-delay="0.2s" style="visibility: visible; animation-duration: 1s; animation-delay: 0.2s; animation-name: fadeIn;">
<img src="img/work-img3.png">
<div class="magnifier">
<div class="visible-title">
<h4><a href="#">Project Name</a></h4>
<small>
<a href="#">Category</a>
</small>
</div>
<!-- end visible title -->
<div class="visible-title1 clearfix">
<span class="pull-left">
<a data-rel="prettyPhoto" href="img/screencapture-file-C-Users-Pickorita-Desktop-ITA-DW-Honey-20Cake-20Site-index-html-1506611749492.png">
<i class="fa fa-search"></i>
</a>
</span>
<span class="pull-right">
<a href="#">
<i class="fa fa-heart"></i>
300</a>
</span>
</div>
</div>
</div>
</li>
```
ul {
display: flex;
justify-content: space-around;
}
@media (max-width: 500px) {
ul {
flex-direction: column;
align-items: center;
}
}
gersho sends brownie points to @kbaig :sparkles: :thumbsup: :sparkles:
:cookie: 344 | @kbaig |http://www.freecodecamp.com/kbaig