« first day (4531 days earlier)      last day (433 days later) » 

12:40 AM
@Adan do you mean “right: 50px”? And also, what do you mean by “not working”? Happy to help. Just gotta get some more information first
 
 
17 hours later…
6:08 PM
Hi Guys how can I drill down from class="card" to card-body and update the values?
I am trying to use something like this
var card = $(".card").first();
var newCard = card.clone();
 newCard.find('input[id="AlgorithmPageNumber"]').attr("name", "recommendationData[" + ddCount + "].AlgorithmPageNumber").val('');
but its not finding the ids
Do I need to drill into the class card-body?
 
no
if it's there, and matches that selector, .find will find it.
 
<div id="accordion">
  <div class="card">
    <div class="card-header" id="headingOne">
      <h5 class="mb-0">
        <button class="btn btn-link" data-toggle="collapse" data-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
          Collapsible Group Item #1
        </button>
      </h5>
    </div>

    <div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
      <div class="card-body">
        Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cup
So I clone that card class
and my input is in that card-body class
and it not updating the name attr and setting the value to empty string
I dont need to do something like newCard.find('div.collapse div.card-body
 
6:28 PM
there's no input in that html
 
<div id="accordion">
  <div class="card">
    <div class="card-header" id="headingOne">
      <h5 class="mb-0">
        <button class="btn btn-link" data-toggle="collapse" data-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
          Collapsible Group Item #1
        </button>
      </h5>
    </div>

    <div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordion">
      <div class="card-body">
      <textarea class="form-control valid" cols="20" data-val="true" data-val-required="Algorithm Page Number is required." id="Algorithm
 
if i took that html and dropped it into jsfiddle, newCard.find('input[id="AlgorithmPageNumber"]') would find it.
 
Let me try it
 
err
no
textarea !== input
just like div won't find spans
 
Yes I saw that I change it to textarea
but it still is not working
 
6:36 PM
it works just fine
 
what did I do wrong
 
eh
your selector is still wrong
spaces have meaning in css selectors
 
I see your is missing form-group row
 
i simplified your problem to make sure we're focusing on a single problem
if you correct your selector, that line of code will find the textarea and modify it
 
Ok
 
6:43 PM
textarea[id="foobar"] is distinctly different from textarea [id="foobar"]
 
Ok thanks for the help
 
6:57 PM
would this work for change the a tag
newCard.find('a[id="collapse0"]').attr("id", collapseBody);?
 
I made a web app for the first time in like a year
And I used vanilla, which was refreshing
 

« first day (4531 days earlier)      last day (433 days later) »