Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jun 19 2020 20:09
    @krisb1220 banned @Gastony
  • May 14 2020 22:39
    @bjorno43 banned @minitechtips_twitter
  • May 14 2020 22:38
    @bjorno43 banned @real-action
  • Feb 01 2020 00:27
    @bjorno43 banned @Ndoua
  • Jan 07 2020 03:10
    @bjorno43 banned @doctor-sam
  • Aug 17 2019 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 2019 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 2019 17:13
    @mstellaluna banned @cmal
  • Jan 08 2019 22:05
    @mstellaluna banned @dertiuss323
  • Nov 07 2018 04:42
    User @texas2010 unbanned @ows-ali
  • Nov 02 2018 16:25
    @texas2010 banned @ows-ali
  • Oct 12 2018 05:50
    @bjorno43 banned @NACH74
  • Oct 05 2018 23:02
    @mstellaluna banned @JomoPipi
  • Sep 16 2018 12:21
    @bjorno43 banned @yash-kedia
  • Sep 16 2018 12:16
    @bjorno43 banned @vnikifirov
  • Sep 05 2018 08:12
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:57
    User @bjorno43 unbanned @rahuldkjain
  • Aug 23 2018 16:23
    @bjorno43 banned @rahuldkjain
  • Jul 29 2018 14:13
    User @bjorno43 unbanned @jkyereh
Sweet Coding :)
@SweetCodingInc
no worries :+1:
so this one <div class="row suggestion-image-row
what do you want gone inside this?
Arun Shah
@ameeno
well instead of <div class="Suggestion col-md-2 suggest"><img src="./images/no-content-img.png"><br />No Contents</div>
I want it to update to <div class="Suggestion col-md-2 suggest"><img src="./images/{text id}.jpg"><br />{text: title}</div>
Sweet Coding :)
@SweetCodingInc
Right.. then you can just create new elements like you created new li elements
don't use <br/> btw
Arun Shah
@ameeno
i have used {text} to signify ajax values. also i am limited to 5 columns but 20 items (A later) part is i need to be able to change the images based on slider control
can i not simply update the existing feilds rather than make new ones?
Sweet Coding :)
@SweetCodingInc
Technically, you could...
Arun Shah
@ameeno
Is there any way i could push all my xml to a "STACK" and update the images based on slider controls from the stack?
Sweet Coding :)
@SweetCodingInc
but then again, you will have broken images that you have added there that don't have any src until your ajax responds
@ameeno There is, but you'd have to implement that part personally.
There is no built in mechanism for that
Arun Shah
@ameeno
Sweet coding ok well,
the existing images are just the same image over and over a "Place holder" image
Sweet Coding :)
@SweetCodingInc
I see..
Dany Din
@danydin
@SweetCodingInc sweeeety
Sweet Coding :)
@SweetCodingInc
then you just want the text content dynamic
@danydin :wave:
Dany Din
@danydin
how i add this * to my site and apply it to specific elements
https://github.com/lcdvirgo/bootstrap/tree/master/assets/fonts/%5BFontFont%5D%20Kievit
Arun Shah
@ameeno
oh my XML file is not documenting images the images are in my /images/ folder already, the XML just constains the id of the image and the id is also the image name
Sweet Coding :)
@SweetCodingInc
I see
Arun Shah
@ameeno
Ok, Sweet, whats the code for change rather than append
Sweet Coding :)
@SweetCodingInc
then it's better to create it dynamically
Arun Shah
@ameeno
ok
Sweet Coding :)
@SweetCodingInc
ye.. so you have <div class="row suggestion-image-row"> that currently has your html
Arun Shah
@ameeno
yep
Sweet Coding :)
@SweetCodingInc
remove that html first and keep it just
<div class="row suggestion-image-row">
</div>
we'll append to this...
Arun Shah
@ameeno
ok
Sweet Coding :)
@SweetCodingInc
change operation is going to be costlier, performance wise, than inserting new markup
Dany Din
@danydin
sweeeTty
Sweet Coding :)
@SweetCodingInc
@danydin hold on...
@ameeno you have this part in your ajax
success: function(data) {
            $(data).find('programme Data').each(function() {
first cache the div that you want the new content to be appended to and empty it programmatically
Arun Shah
@ameeno
i dont understand sweet coding
cache the div?
Sweet Coding :)
@SweetCodingInc
success: function(data) {
  var $imgRow = $('.suggestion-image-row'); // cache the element so that we're not repeatedly accessing dom for this
  $imgRow.empty(); // programmatically empty the element so that you have space for new shit
  $(data).find('programme Data').each(function() {
cache simply means you save a reference to something so that it can be used later on
faster access
Arun Shah
@ameeno
oh ok chuck it into a var
Sweet Coding :)
@SweetCodingInc
Yeah.. haha
Arun Shah
@ameeno
ok ok right thanks got it
Sweet Coding :)
@SweetCodingInc
often using terms like cache instead of chuck it into a var gives you better advantage at the time of interviews...
it's stupid but still :laughing:
Arun Shah
@ameeno
ok yea it makes sense now
Sweet Coding :)
@SweetCodingInc
Then inside the .each you will construct new markup, and append it to $imgRow
Arun Shah
@ameeno
ok to maximise effeciency?
Sweet Coding :)
@SweetCodingInc
yes..