Linc

Member Since 8 Months Ago

Experience Points
1,560
Total
Experience

3,440 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed
0
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start your engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-in-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist Created with Sketch.

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

  • Community Pillar

    Earned once your experience points ranks in the top 10 of all Laracasts users.

Level 1
1,560 XP
Feb
08
1 month ago
Activity icon

Started a new Conversation How To Find The Scripts Inside My Document

Hi,

I need to find a script in my document.

For example,i need to find if jQuery script is in my document:

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.10.0/jquery.min.js"></script>

I have a function like this, but I'm not able to find the right way.

var scripts = document.getElementsByTagName('script');
$(scripts).each(function(i, script){
      		if ()  { //found jQuery script
          	   console.log ('This script is found!')
      		 } else () { //not found jQuery script
				 console.log ('This script not found!')
      	 	}
    	}
 })

Have you got any solution?

Thank you!

Have you a salvation for this?

Feb
07
1 month ago
Activity icon

Started a new Conversation Mouseover On Document For Find A Classes

There is my jsfiddle:

https://jsfiddle.net/krq4gswh/

I need to show mi tooltip with text if i pass the mouse over my div , but when i pass over my .container1, it doesn't works good, because it show me 'Container1 found!', alternate by 'None'.

Have you got any other solution?

Thank you!

Jan
28
1 month ago
Activity icon

Replied to Disable Swipe Left/right On Mobile View. (for A Carousel)

Hi @automica , I'm using a pure js/jquery for my carousel.

Jan
25
1 month ago
Activity icon

Started a new Conversation Disable Swipe Left/right On Mobile View. (for A Carousel)

Hi,

I have classic carousel with arrow left and arrow right for scroll the images. I need to disable the mobile event swipe left and right (with finger) for my carousel; is that possibile with javascript (not css i supposed)? I need to scroll the images only with my arrows left and right.

Thank you!

Jan
21
1 month ago
Activity icon

Replied to Swipe Left/right Event On Mobile Devices, Like A “click”

Thank you Jlrdw, it's very cool, but i need to work inside this carousel; I have no possibilities to create a new one with bootstrap :(

Activity icon

Started a new Conversation Swipe Left/right Event On Mobile Devices, Like A “click”

Hi dev!

I need help: I have a classic carousel with arrow next and arrow prev for the images; I need to change the event like a click, in an event for switch next or prev image.

This:

$('.next-arrow").click(function({
    //Move the carousel to the next photo
})

$('.prev-arrow").click(function({
    //Move the carousel to the prev photo
})

Like this:

$('.mycarousel").svipe on right (function({
    //Move the carousel to the next photo
})

$('.mycarousel").svipe on left(function({
    //Move the carousel to the prev photo
})

Thank you!

Jan
19
1 month ago
Activity icon

Replied to If/else Works With A Determinate Class Only.

Hi sr57

Yep, but I have a "default" html like this; I need to find a trick to hide the second log when I pass "HOVER THIS CLASS 1".

Activity icon

Started a new Conversation If/else Works With A Determinate Class Only.

I have a small problem with detected a class and select only this class for my if/else if:

<div class="my-class-1">
  <div class="my-class-2">
   <div> HOVER THIS CLASS 1</div>
 </div>
</div>


<div class="my-class-2">
  <div> HOVER THIS CLASS 2</div>
</div>
$(document).mouseover(function(event) {
   $(event.target).parents().each(function(I, val) {
      if($(val).is('.my-class-1)){
        console.log ('This is my-class-1');
      } else if ($(val).is('.my-class-2)){
        console.log ('This is my-class-2')
      }
   })
});

The problem is this: when the mouse pass over the class .my-class-1, the console.log() give me 'This is my-class-1' and 'This is my-class-2', but when the mouse pass over the class .my-class-, give only (the expected result) 'This is my-class-2'.

My exited result when pass over the class .my-class-1, is console.log() 'This is my-class-1', and not 'This is my-class-1' and 'This is my-class-2'

Thank you

Jan
12
1 month ago
Activity icon

Started a new Conversation Load A Function Only If $(window).width() < 700

Hi,

I have function like this:

test()
$(window).resize(test)

function test() {
  if($(window).width() < 700) {
     //load my function only for the view < 700px 
  } 

  //else -> return to my desktop view ($(window).width() > 700), and remove the function used for < 700px
}

But I have a problem: one the function is loaded, it stays loaded whether the browser window is resized smaller or not.

Is there a way to only load a function if the window is < than 700px and completely remove it if the window is > than 700?

Thank you very much!

Dec
19
2 months ago
Activity icon

Replied to Append Array Of Object Values If Index Is The Same Index Of A Div List.

Thank you very much @marianomoreyra ! This is the right solution for me; thanks for the code and info about that.

Dec
18
2 months ago
Activity icon

Started a new Conversation Append Array Of Object Values If Index Is The Same Index Of A Div List.

Hi, I need help: I have one object with multiple array inside; i need to cycle all my array values and then append this values inside my HTML div list (with the same class). object[0] with div[0]; object[1] with div[1] ecc...

This is an example:

<!-- HTML -->

<body>
    
    <div class="appendDiv">
        <h1>First</h1>
    </div>

    <div class="appendDiv">
        <h1>Second</h1>
    </div>

</body>

⁄⁄JS

var values = [
    {
        'name': "john"
    },
    {
        'name': "doe"
    }
]

for (var i = 0; i < values.length; i++) {
    value = values[i];
    var name = value.name;
    
    $('.appendDiv').each(function(index, val){
        if (i === index) {
            $('.appendDiv').append('<p>' + name + '</p>');
        }
    })
}

But this method return to me with a wrong result like this:

First John Doe

Second John Doe

I need a result like this:

First (my first .appendDiv [0]) John (my first array name value [0])

Second (my second .appendDiv [1]) Doe (my second array name value [1])

Thank you.

Dec
04
3 months ago
Activity icon

Started a new Conversation Find <iframe> Width And Height.

Hi,

I have an object like this:

object = {
    iframe: "<iframe width="560" height="315" src="YouTube link"></iframe>"
}

I need to take the width (in this case 560) and height (in this case 315) value inside this with jQuery/js. Because I need to use this value.

Is that possible?

Thank you.

Nov
24
3 months ago
Activity icon

Replied to Pass A Function Value Inside Another Function (Angular Js)

Hi @sergiu17 ;

Thanks for the reply, but I have a code html like this:

<div>
      <li ng-repeat="language in languages" ng-click="myFirstFunction(firstValue)
             {{language.lang}}
      </li>
</div>
<div>
      <li ng-repeat="age in agess" ng-click="mySecondFunction(secondValue)
             {{age.year}}
      </li>
</div>

I have 2 different functions because the value will arrive from 2 different clicks. I need to take this 2 values inside myThirdFunction.

Thank you!

Activity icon

Started a new Conversation Pass A Function Value Inside Another Function (Angular Js)

Hi!

I need to pass a value from a function, to another one. Like this:

$scope.myFirstFunction = function (firstValue) {
    console.log(firstValue);
}

$scope.mySecondFunction = function (secondValue) {
    console.log(secondValue);
}

$scope.myThirdFunction = function () {
    $scope.myFirstFunction(firstValue) // I need to import this value into this myThirdFunction()
    $scope.mySecondFunction(secondValue) // I need to import this value into this myThirdFunction()
    // console.log(firstValue);
    // console.log(secondValue)
}

(My value arrived from my ng-click)

Thank you!

Nov
13
3 months ago
Activity icon

Replied to "Push" A Value Choice Inside My Div.

Ho @bugsysha I'm using Angular; with ng-click, I pass the value into my controller.

ng-click="thisLang(lang.lang_code)"
Nov
12
3 months ago
Activity icon

Started a new Conversation "Push" A Value Choice Inside My Div.

Hi guys:

In my HTML i have onclick choice value; when i click on this, i want to push my choice inside this div:

var myText = '[id="' + this.id + '" type="text"]';

I have e choice values: a value like lang ( a choice of languages like en,fr,de...) and value with the ages and i need to push this 2 values into my variable with possibilities to change my choice.

Have you got any idea with js? I tried with .push, but it doesn't work.

Thank you.

Activity icon

Started a new Conversation Passing A Drop Down Menu Value Choice (Angular)

Hi guys,

I'm using UIB (bootstrap for angular). I have a drop down menu with a lang choice (like en,de,fr...); i need to show my dropdown menu choice after LANGUAGE:

 <span uib-dropdown on-toggle="toggled(open)">
                    <a href id="simple-dropdown" uib-dropdown-toggle>
                        <button class="btn btn-default"> LANGUAGE: {{ I WANT TO SOW LANG CHOICE HERE}} </button>
                    </a>
                    <ul class="dropdown-menu" uib-dropdown-menu aria-labelledby="simple-dropdown">                                         <li index="$index" ng-repeat="lang in langs" ng-click="thisLang(lang.lang_code)">
                            <a>{{lang.lang_code}}</a>
                        </li>
                    </ul>
                </span>

Have you got any idea?

Thank you.

Nov
06
4 months ago
Activity icon

Replied to Slidable Strip For Carousel

Hi @automica, thank you.

I give you an example of the code. My slideshow html is like this:

<div class="clientWidthContainer">
    <div class= "myCarousel">
         <div class="myImage">
               <img src="">
         </div>
         <div class="myImage">
               <img src="">
         </div>
         <div class="myImage">
               <img src="">
         </div>
        <div class="myImage">
               <img src="">
         </div>
        <div class="myImage">
               <img src="">
         </div>
    </diV
</div>
	

The carousel start with a view of 3 images (changed on responsive); every time I click on the next or prev arrow, it will change my left position to show next ora prev 3 images.

myCarousel.css ({
     left: //every time it calculate the left for the movement of the image I will see
})

In this case I created my bar, i calculated the difference between the container of the black bar, and the black bar and I found the remaining space For the movements of the bar, i thinked to divided this remaining space for how many photo my carousel show (3 in desktop view, but it is responsive, and will change the number of photo I will see)

var greyline = $('<div class="fpls-grey-line"></div>');
var blackline = $('<div class="fpls-black-line"></div>');
var remaining = greyline.width() - blackline.width();

var pageWidth = $('.clientWidthContainer').clientWidth; // width is set 75% of max width.
var elementsCount = $('.myCarousel') / pageWidth;
var elementsCount = Math.floor(elementsCount);

//Next 

blackline.css({
    left: '+=' + remaining / elementsCount
});

// Prev
self.line.css({
    left: '-=' + remaining / elementsCount
});

Have you got any other idea? On every click next/prev, i need to change the position of my black bar, calculated for the number of the photo I see.

Thank you!

Nov
03
4 months ago
Activity icon

Replied to Slidable Strip For Carousel

hi @gitwithravish, i made an own carousel (slide from left) without plugin, in pure HTML, CSS and Js/jQuery. I need to create a bar which is "follow" the move of the carousuel when click on next or prev button.

Nov
02
4 months ago
Activity icon

Started a new Conversation Slidable Strip For Carousel

Hi guys!

I have a simple strip like this:

<div class="grey-line">
    <div class="black-line"></div>
</div>

<style>
    .grey-line {
        height:100%;
        width: 4px;
        background: grey;
   }

 .black-line {
        height:30%;
        width: 4px;
        background: black;
   }
</style>

I have a classic carousel with prev and next arrow; i need to move this black-line every time i will move my carousel on left or right; in % of a carousel width.

Can you help me?

Thank you!

Oct
27
4 months ago
Activity icon

Replied to Add JQuery Only For Mobile View.

Thank you @michaloravec; i tried this different solutions, the same problem is when I try to resize from desktop to mobile: if I don't reload the page, it is not responsive like a css when I use the @media screen.

Has jQuery a function for reload page automatic for this case? For example when the page change from < 769 and when return > 769.

Activity icon

Started a new Conversation Add JQuery Only For Mobile View.

Hi guys.

I haver two different view for mobile and desktop: for desktop i have 3 inline images, and for mobile view i have a carousel with next and prev arrow for the images view. I have this js for the carousel:

var slideIndex = 1;
showDivs(slideIndex);

function plusDivs(n) {
  showDivs(slideIndex += n);
}

function showDivs(n) {
  var i;
  var x = document.getElementsByClassName("mySlides");
  if (n > x.length) {slideIndex = 1} 
  if (n < 1) {slideIndex = x.length} ;
  for (i = 0; i < x.length; i++) {
    x[i].style.display = "none"; 
  }
  x[slideIndex-1].style.display = "block"; 
}

I need this code only for mobile view, because it give display:block only for the first image, and it is in contrast with my inline view for the desktop.

I try to use :

$(window).on('resize', function (){
var win = $(this);
if (win.width() <= 768 {
   //my js here
}

But this is not the best solution for the resizing, because it work if I resize from desktop to mobile view, but from mobile to desktop, it doesn't work, like a

$(window).width 
if (win.width() <= 768) {
   //my js here
}

Have you got another solution? Like a "Add jQuery only for mobile view" and not for desktop view?

Thank you!

Oct
14
4 months ago
Activity icon

Replied to Remove White Space Before A Word.

Thank you @michaloravec and @bugsysha I'm going to try this 3 ways!

Activity icon

Started a new Conversation Remove White Space Before A Word.

I have a word like "name" which is display in my text. I want to remove "name" and the white space before this word; this is an example: Hi name how are you? I removed name with replace method:

var myText = myText.replace("name", '').

But I have a white space before this word "name", and if I replaced "name" with '', the text will be: Hi how are you? N.B.: Between "H"i and "how" words, there are 2 white space; and I want to remove this one. It is the same when I change name position like this : Hi my name is John. If I replace "name", there are 2 white space between "my" and "is" words, and "Hi and "my" appear "Himy" in a single word whiteout whitespaces. I tried to removed the first space like this:

var myText = myText.replace(' ', '').replace("name", '') ;

But it removed only the first white space in my Text, and not the white space before "name" word.

In this case (Hi name how are you?)it works good, because I removed the first white space, which is the white space before "name" word; but in this case (Hi my name is John) it doesn't works good.

Have you got a solution for this?

Thank you!