Search Results

Search found 4 results on 1 pages for 'flyingcat'.

Page 1/1 | 1 

  • Simple css class selector issue

    - by FlyingCat
    I am having a problem with a simple first of type css issue I have <div class='test'> <div>test 1</div> <div>test 2</div> </div> <div class='test'> <div>test 3</div> <div>test 4</div> </div> <div class='test'> <div>test 5</div> <div>test 6</div> </div> I want the first test div showing background red and the rest are blue. I have .test{ background-color: blue; margin: 15px; border-top: dashed 1px grey; } .test:first-of-type{ background-color: red; border-top:0; } but all my divs are showing blue. Am I doing something wrong here? Thanks for the help!

    Read the article

  • javascript array/object issue

    - by FlyingCat
    I am trying to push elements to an array. for (a=0; a < test.length; a++){ if(this.testnumber != test[a].number){ //it will only loop 8 times under conditional statement group = { title: test.Title , ID: test.ID, contents: [] }; this.company.push(group); this.testnumber = test.number[a]; } //outside of if conditional statement.. it will loop 15 times //i want every test[a].conetents get pushed to group.contents array. //this.company is the final variable I need for this function... group.contents.push(test[a].contents); } However, when I do console.log(this.company); I see 8 elmements with only 1 element in each group.contents array The ideal situation is to have 8 elements with 2 to 3 elements in the group.contents array I hope I explain my situation well. Any idea how to solve my issue? Thanks a lot!

    Read the article

  • Force reload/refresh when pressing the back button

    - by FlyingCat
    I will try my best to explain this. I have an application that show the 50+ projects in my view page. The user can click the individual project and go to the update page to update the project information. Everything works fine except that after user finish updating the individual project information and hit 'back' button on the browser to the previous view page. The old project information (before update) is still there. The user has to hit refresh to see the updated information. It not that bad, but I wish to provide better user experience. Any idea to fix this? Thanks a lot.

    Read the article

  • How to add an object into an object

    - by FlyingCat
    I am trying to add an object into another object. My previous post helped me on the array issue but I also need to add object into an object too. I have something like var temp = {}; for(var i=0; i<test.length; i++){ console.log(test[i]) console.log(product[i]) temp.test[i] =product[i]; } Both of console.log show values. However, I am getting "Uncaught TypeError: Cannot set property '0' of undefined" for the temp.test[i] =product[i] Can someone help me out on this? Thanks a lot

    Read the article

1