-1

I want to hide an element inside an <object> tag , the element is <div class="footer">...</div> I tried this code but still not working, please help me

<div> 
     <object id="t" type="text/html" data="https://www.example.com/" width="100%" height="600px" style="overflow:auto;">
     </object>
</div>

and this is my javascript code

<script>
  $(document).ready(function(){
       var t = document.querySelector("#t");
       var htmlDocument = t.contentDocument;
       htmlDocument.getElementsByClassName("footer")[0].style.visibility='hidden';
  });

</script>

ERROR: In NavArgument, unable to find attribute type

I'm trying to integrate these libraries into my Android project to make a navigation controller. When I add in these two lines to my build.gradle -

implementation 'android.arch.navigation:navigation-fragment:1.0.0-alpha01' implementation 'android.arch.navigation:navigation-ui:1.0.0-alpha01'

It syncs ok, but in build I get this error:

ERROR: In NavArgument, unable to find attribute type.

I was able to build Google's sample project that uses the relevant libraries without problems.

My project has:

  • androidSupportLibrary 27.1.1
  • projectTargetVersion 27
  • projectCompileSdkVersion android-P
  • projectBuildToolsVersion 27.0.2
  • gradleVersion 3.0.1
  • gradlePlugin 4.4

I've already tried upgrading all these versions^, doing a clean build, restarting Android Studio, etc.

I also get some Java compiler errors.

Any thoughts on why this might happen?

4

1 回答 1

0

谢谢我通过使用 iframe 和 css 来修复它(在我的网站中隐藏 example.com 的页脚):

<div style="overflow:hidden;">
<iframe src="https://www.example.com/" name="iframe_all" frameborder="0"  style="width: 100%; height: 650px; margin-bottom: -120px;" ></iframe>
</div>
于 2018-06-08T03:13:57.593 回答